Neulinger, Nathan wrote:

It's actually relatively speedy WITH the bad index, but maintaining that
index (given it's lopsided nature) is very expensive.
Yes, the point is to ONLY index the row if it matches the restriction.

To clarify, if MySQL is indexing a binary value with lopsided distribution, simply only keep an index of record locations for the less-likely value. The more-likely value will end up being table-scanned.

'true', 'true', 'false', 'true', 'true', 'true'
... 'false' -> 3rd row.
... 'true' -> read the whole thing.

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reply via email to