MySQL Forums
Forum List  »  MyISAM

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

(VIQA && 1024 = 1024) -->
(VIQA & 1024 = 1024)
http://dev.mysql.com/doc/refman/5.0/en/bit-functions.html#operator_bitwise-and

It is unclear whether the &s will be any slower than IN(...).

IF (and it is a big IF) the INs could use an index, then that would be better. But not in your case.

You are looking at
WHERE PointID >... AND VIQA IN(...)
even this index won't use the VIQA part:
INDEX(PointID, VIQA)
This is because the 'range' for the PoinID makes it impractical to do anything fancy with VIQA. Compare: Given INDEX(lastname, firstname), find all people with initials PG. The main benefit in the index is finding all the G names; firstname is not really worth checking.

In rare cases, MySQL 5.1 will intersect two indexes. But that tends to be a lot of work for limited benefit.

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.