> >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
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to