471,075 Members | 1,252 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,075 software developers and data experts.

Max length of SQL statement

Hello:

Do any one know the max length of a SQL statement?

Thanks!
Carmen

__________________________________________________ _______________
No masks required! Use MSN Messenger to chat with friends and family.
http://go.msnserver.com/HK/25382.asp
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #1
1 6144
"Carmen Wai" <wa********@hotmail.com> writes:
Do any one know the max length of a SQL statement?


There is no specific limit; it'll depend on available memory and
complexity of the statement. I've run tests with multi-megabyte
string literals, tens of thousands of WHERE clauses, etc.

MySQL's "crashme" test program attempts to discover the maximum length
of a SQL statement in the tested database. The last time I tried it,
I was highly amused to watch the test program run out of memory and dump
core before Postgres did. (This was a couple years back, so maybe
they've fixed their problem by now.)

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

26 posts views Thread by Adrian Parker | last post: by
2 posts views Thread by Frank Swarbrick | last post: by
4 posts views Thread by Roy Epperson | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.