What is the maximum statement length in Oracle

跟風遠走 提交于 2019-12-19 05:46:36

问题


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.


回答1:


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".




回答2:


According 11.2 Limits documentation:

Maximum length of SQL statement, including the NULL terminator. 409,600

https://docs.oracle.com/cd/E11882_01/timesten.112/e21643/limit.htm#TTREF455



来源:https://stackoverflow.com/questions/14355819/what-is-the-maximum-statement-length-in-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!