MySQL Forums
Forum List  »  MyISAM

Re: Optimize table locks the whole database
Posted by: Ingo Strüwing
Date: January 17, 2007 11:07AM

Hi.

Yes. That's basically the same (but exchange the table names in the RENAME statement).

However there is a moment where y does not exist. And during the INSERT SELECT you will not be able to insert into y. Even if you could, the newly inserted rows would not be copied to x.

If you are regularily dropping parts of your data and adding new ones, you might be better off with a MERGE table. Adding a new sub-table and droping another one can be done in one go and it is a very quick operation. No data movement is required.

Regards
Ingo

Ingo Strüwing, Senior Software Developer - Storage Engines
MySQL AB, www.mysql.com

Options: ReplyQuote


Subject
Views
Written By
Posted
10048
December 31, 2006 12:46AM
Re: Optimize table locks the whole database
2939
January 17, 2007 11:07AM


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.