NYCPHP Meetup

NYPHP.org

[nycphp-talk] [OT] MySQL Tuning.

Jiju Thomas Mathew lists at silmail.com
Thu Mar 1 23:53:57 EST 2007


>
> > >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.
>
> The manual indicates that's for MyISAM tables.  You said you're using
> InnoDB.
>
>
Oops.. yes Dan.. I overlooked it.. and was using that on most of my tables,
when I needed bulk inserts..

I just checked it on my 4.12-max

mysql> alter table personaldetails disable keys;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+---------------------------------------------------------------------+
| Level   | Code |
Message                                                             |
+---------+------+---------------------------------------------------------------------+
| Warning | 1031 | Table storage engine for 'personaldetails' doesn't have
this option |
+---------+------+---------------------------------------------------------------------+
1 row in set (0.00 sec)

So it seems that for InnoDB engine, dropping the indexes, and recreating it
is the only way.. ?

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


More information about the talk mailing list