NYCPHP Meetup

NYPHP.org

[nycphp-talk] [OT] MySQL Tuning.

Hans C. Kaspersetz hans at cyberxdesigns.com
Wed Feb 28 14:07:34 EST 2007


I moved it to OT because it is not directly PHP related, except that PHP 
is driving all the SQL.

> ALTER TABLE <tablename> DISABLE KEYS;
> before import and
> ALTER TABLE <tablename> ENABLE KEYS;
> after import.
>
I am going to look at using DISABLE/ENABLE instead of dropping and adding. 

> if the cardinality is this high, try partial indexes, ie like
> key 'part_combined` (str_md5 (15), str_var (20)), this will just
> reduce the index file size, and in turn help you to handle more
> read requests simultaneously.
I will suggest this approach.
>
> what is the current size of your ibdata1 (you started it at 100M), if you
> want to control it.. try my kit http://www.saturn.in/gpl/mysql.html
>
ibdata1 is 67GB.

With regard to the key_buffer comment from Carlos, we are using 7.3mil 
of 8.3mil.  I am not exactly sure how much to boost this.

Hans



More information about the talk mailing list