MySQL Forums
Forum List  »  MyISAM

Re: .ini settings for ADD KEY to 30Gb table on 96Gb machine?
Posted by: Rick James
Date: November 03, 2010 10:01PM

VIQA -- When fetching the data, what percent of the rows satisfy the VIQA test?

If most satisfy, then "AND (VIQA & WantedFlags = WantedFlags)" is about as good as you can get. The INDEX(VIQA) is useless for this. (And possibly useless for anything else.)

If very few satisfy, then perhaps your IN approach would be better, but it gets more complicated... I would consider
INDEX(VIQA, PointId)
and use UNION instead of IN.

Another possibility (again for "few satisfy") is to PARTITION on VIQA, and still have INDEX(PointId) (not the compound one)

VIQA is currently 2 bytes; would the IN version take more?

MySQL will almost never use two INDEXes in a single query.

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.