views:

419

answers:

2

I need to increase the max_allowed_packet param, to fit some theoretically very large items. If I set this param to say 10M, what price if any am I paying compared to setting it to 1M or 4M. Thanks for any input! Tomas

A: 

I suggest not touching this variable, instead adjusting your storage implementation to handle any size files using the default settings.

Can you see here for an example.

DreamWerx
Thnx, interesting reading, will keep that in mind. But it will seldomy happen that the files are that big, and they won't get read more than once (it's a JMS message).//Tomas
Tomas
+1  A: 

I found this explanation: http://www.astahost.com/info.php/max_allowed_packet-mysql_t2725.html

It's safe to increase the value of this variable because the extra memory is allocated only when needed. For example, mysqld allocates more memory only when you issue a long query or when mysqld must return a large result row. The small default value of the variable is a precaution to catch incorrect packets between the client and server and also to ensure that you don't run out of memory by using large packets accidentally.

Also note that I read you have to change the value for both the mysql client and the mysql server.

Bill Karwin
Thanks, that was my guess too, but as they say, when you assume - you make an ass out of u and me. I'm using JDBC-java client, I'll look into if I need to set some param there.
Tomas