473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

MySQL statement length

I'm not finding what the maximum number of characters that a statement
can be. Anyone know where I can find that spec?
Jan 14 '07 #1
4 13050
Roy Epperson wrote:
I'm not finding what the maximum number of characters that a statement
can be. Anyone know where I can find that spec?
I have found it hard to find this stat as well. I could not find a
definitive answer, but I believe the maximum length of a SQL statement
is 1MB.

It may be the case that the programming interface you use may impose a
shorter limit on the query length than that supported by the MySQL server.

Regards,
Bill K.
Jan 15 '07 #2
Roy Epperson wrote:
I'm not finding what the maximum number of characters that a statement
can be. Anyone know where I can find that spec?
Are you having problems or just looking for some spec?

http://dev.mysql.com/doc/refman/5.0/...too-large.html

" A communication packet is a single SQL statement sent to the MySQL server, a
single row that is sent to the client, or a binary log event sent from a master
replication server to a slave.

The largest possible packet that can be transmitted to or from a MySQL 5.0
server or client is 1GB."

The C API is limited appears to be 16Mb.

Is there some reason for creating a single statement that long?

--
Michael Austin
Database Consultant
Domain Registration and Linux/Windows Web Hosting Reseller
http://www.spacelots.com
Jan 15 '07 #3
Thanks Bill, I suspect that JDBC will allow close to that....

Bill Karwin wrote:
Roy Epperson wrote:
>I'm not finding what the maximum number of characters that a statement
can be. Anyone know where I can find that spec?

I have found it hard to find this stat as well. I could not find a
definitive answer, but I believe the maximum length of a SQL statement
is 1MB.

It may be the case that the programming interface you use may impose a
shorter limit on the query length than that supported by the MySQL server.

Regards,
Bill K.
Jan 15 '07 #4
Michael,
Not having a problem and don't expect to if the JDBC limit is close to
the C API limit. I've using a `select * from aTable where columnName in
(<list_of_primary_keys>)` statement there the primary key is an
autonumber.
Roy

Michael Austin wrote:
Roy Epperson wrote:
>I'm not finding what the maximum number of characters that a statement
can be. Anyone know where I can find that spec?

Are you having problems or just looking for some spec?

http://dev.mysql.com/doc/refman/5.0/...too-large.html

" A communication packet is a single SQL statement sent to the MySQL
server, a single row that is sent to the client, or a binary log event
sent from a master replication server to a slave.

The largest possible packet that can be transmitted to or from a MySQL
5.0 server or client is 1GB."

The C API is limited appears to be 16Mb.

Is there some reason for creating a single statement that long?
Jan 15 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
110
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
0
by: rabbit | last post by:
Hello, I am really stuck with the following problem and I have tried almost all options I could find on Google to no avail. I recently installed the rpm version of MySQL server 5.0.26 on Fedora...
0
by: nrip | last post by:
Dear All, I am facing a very peculiar problem. I am reading a CSV file from my JSP code and trying to insert them into MYSQL database. the program first reads a line and then splits it into words...
2
ak1dnar
by: ak1dnar | last post by:
I need to put the connection string in a global file.because again and again i cant edit the lines. if there is Global file how can call for it.in php i can use require 'dbconfle.php' ; Like wise...
2
by: newbie | last post by:
Dear folks, pardon me if this is a stupid question. For this table --------------------------------------- | id | foo | bar | -------------------------------------- I...
9
by: PI | last post by:
Hi Guys, I need some assistance with the following scenario please. I know this might be more of a MySQL post than a PHP one, but it is likely some developer has been here before and would be...
1
by: javediq143 | last post by:
Hi All, This is my first post in this forum. I'm developing a CMS for my latest website. This CMS is also in PhP & MySQL. I'm done with the ADD section where the Admin can INSERT new records in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.