MySQL Forums
Forum List  »  General

Re: “CACHE INDEX” and “LOAD INDEX INTO CACHE”
Posted by: Rick James
Date: December 29, 2010 01:45PM

If the table is reloaded nightly, MyISAM should be fine. Furthermore, you could get rid of the PK and UNIQUE index since (presumably) you have validated that there are no dups:
INDEX(id, name)
INDEX(name, id)
Then the SELECTs would touch only the indexes.

Here is a way to reload the table with minimal downtime:
CREATE TABLE new ...
INSERT INTO new ...
RENAME TABLE dict TO old, new TO dict;
DROP TABLE old.
The only blockage with be in the RENAME, which is essentially instantaneous.
I don't know if the INSERTs would have sufficiently primed the key_buffer so that no further LOAD CACHE would be needed.

Options: ReplyQuote


Subject
Written By
Posted
Re: “CACHE INDEX” and “LOAD INDEX INTO CACHE”
December 29, 2010 01:45PM


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.