MySQL Forums
Forum List  »  Performance

Re: insert or load ? best practices and performance
Posted by: Rick James
Date: September 21, 2010 03:29PM

Sure, the time will be the same.

I work in a 24/7 environment -- no downtime, no locking tables for more than seconds, etc.

I assume you are on a live system, where you don't want any down time, but you you can avoid writing to the table during the conversion. My approach keeps the old table alive and readable until the RENAME; the RENAME takes zero time; then the new table is live.

If you don't care about staying live, then the neither approach is 'better'.

Also, my approach keeps the old table around (until you DROP it). If the LOAD screws up, you can play RENAME games to get it back.

Options: ReplyQuote




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.