Mysql 5.1: if we want to use very large blobs, apparently we need very large packets, configured identically on both ends. How large can we go before something explodes?

See this.

link|improve this question

79% accept rate
It's not TCP or UDP packets. – toor Nov 25 '10 at 1:35
Provide a link to the documentation that you're reading that leads you to believe this. – mfinni Nov 25 '10 at 1:50
dev.mysql.com/doc/refman/5.1/en/packet-too-large.html Sounds close to what is being asked. – sysadmin1138 Nov 25 '10 at 1:55
feedback

2 Answers

what is a mysql 'packet', anyway

That page you linked to describes exactly what a packet is. It is:

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

So, if your packet size is set to 16Mb, then you won't be able to return a row larger than 16Mb in size. If you have the potential to be storing a 500Mb BLOB then you will need to increase your packet size to > 500Mb to accomodate this.

How large can we go before something explodes?

MySQL cannot return a single row larger than 1Gb, so I guess your maximum blob size is 1Gb - size of other fields in row

link|improve this answer
Actually, that's a link provided by sysadmin1138, the OP added it in after the comment was left. Which, as you pointed out, answers the question. – mfinni Nov 25 '10 at 3:06
feedback

First thing you need to understand is what is the definition of a MySQL Packet which I addressed in SuperUser.

I have had cases at work where I set max_allowed_packet to 512M without incident over these years. I wrote something about this in the DBA StackExchange.

You will need to make it this option large enough to accommodate at least 10 BLOBs. If you have BLOB that big, you should store the URL of the BLOB and keep the BLOB in an external file.

CAVEAT

PostgreSQL does that automatically in TOAST files. (TOAST : The Outside Attribute Storage Technique for column data whose size exceeds 1GB).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.