MySQL Forums
Forum List  »  MyISAM

Re: delete caused all kinds of problems
Posted by: Ingo Strüwing
Date: October 17, 2005 12:06PM

Do you have many indexes on the table?
You may want to ALTER TABLE ... DISABLE KEYS; DELETE ...; ALTER TABLE ENABLE KEYS;
This will however grow your index file with every ENABLE. You will need to OPTIMIZE TABLE before it becomes too big (Bug #4692).

Another way could be CREATE TABLE new_table (...) AS SELECT ... WHERE id>=500000; RENAME TABLE ... old_table; RENAME TABLE new_table ...; DROP TABLE old_table.

Options: ReplyQuote


Subject
Views
Written By
Posted
2609
September 30, 2005 11:03AM
1840
September 30, 2005 03:27PM
Re: delete caused all kinds of problems
1782
October 17, 2005 12:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.