MySQL Forums
Forum List  »  Optimizer & Parser

Re: multiple-column index and order by
Posted by: Rick James
Date: July 10, 2012 12:55PM

I'll bet it did use the index. But it failed to give you any useful clues.

Note that it did say "Using index". This means that all the work was done in the INDEX, and the "data" was not touched.

Plan A: This may say more info (but I doubt it):
EXPLAIN EXTENDED SELECT ...;
SHOW WARNINGS;

Plan B: Upgrade. Later versions may say more.

Plan C: Here is how you can discover whether it actually read only 100 rows:
SHOW SESSION STATUS LIKE 'Handler_read%';
SELECT ...
SHOW SESSION STATUS LIKE 'Handler_read%';
Then subtract the values. I think one (or more) diff will be "100" and none will be 5 million.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: multiple-column index and order by
1464
July 10, 2012 12:55PM


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.