Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the maximum statement length in Oracle

I'm building a SQL statement that contains data and I'm wondering if I would break some maximum statement length in Oracle 10g.

The statement would be about 3 200 000 bytes, cannot be split and has to be parsable in its entirety.

Before I'm investing too much time this way, I was wondering if I would be limited by the size of this statement.

I am using SQL developer but I think that if the server can do it, so can SQL developer.

like image 997
BenoitParis Avatar asked Jan 16 '13 10:01

BenoitParis


People also ask

What is the maximum length of SQL query?

The maximum standard SQL query length is 1024.00K characters, including comments.

What is the limit of in clause in Oracle?

In Oracle we can only put up to 1000 values into an IN clause.

What is the maximum table name length in Oracle?

For logical table names stored within an Entry table, you can have up to 40 characters. Form names are limited to 100 characters, which is also the Library manager limit on any file name. Section names are limited to 64 characters.


1 Answers

There is no fixed number. See "Logical Database Limits": http://docs.oracle.com/cd/B19306_01/server.102/b14237/limits003.htm

"The limit on how long a SQL statement can be depends on many factors, including database configuration, disk space, and memory".

You might also be affected by other limits, such as the maximum levels of subqueries.

Given that the maximum length of PL/SQL procedures is given as 2000-3000 lines, my feeling is that you may run into problems with a 3M bytes query. I also think that if it works at all, the parse time will be "interesting".

like image 85
Chris Avatar answered Oct 23 '22 14:10

Chris