Friday, June 1, 2012

MySQL join_buffer_size

On the surface, it seems to suggest that this should be set to a high value to improve join performance. It is not so.

This buffer is created once per join per thread, plus it represents the minimum value. It seems that if MySQL needs more, it will automatically allocate more. In this case, there should be no need to set this setting, and dangerous to set it to a very high value.

References:
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_join_buffer_size
http://www.mysqlperformanceblog.com/2010/07/05/how-is-join_buffer_size-allocated/

No comments:

Post a Comment