NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL Tuning.

Jiju Thomas Mathew lists at silmail.com
Wed Feb 28 12:32:33 EST 2007


> There were two indexes: Primary and a compound index of two string
> columns (32bit String MD5 + varchar50).  The combination has a
> cardinality of about 400,000.  Dropping the indexes before we started
>

This is quite okay.. and this is how it is designed.. actually mysql tries
to update
the indexes as the import is processing.. well you could try
ALTER TABLE <tablename> DISABLE KEYS;
before import and
ALTER TABLE <tablename> ENABLE KEYS;
after import.

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.

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

-- 
Jiju Thomas Mathew
http://www.php-trivandrum.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070228/8578ab81/attachment.html>


More information about the talk mailing list