MySQL Forums
Forum List  »  Performance

Re: Select last date check all rows
Posted by: Rick James
Date: August 05, 2015 05:49PM

Unfortunately EXPLAIN gives misleading info for number of rows when a LIMIT is involved.

Yes, it should have used the index and come back 'instantly' after fetching only 1 row.

Please provide SHOW CREATE TABLE y -- There might be some subtle reason for the problem (engine, datatype, prefixed index, etc)

Another way to measure the 'effort' taken is via:
FLUSH STATUS;
SELECT ...;
SHOW SESSION STATUS LIKE "Handler%";

Working correctly, that will show tiny numbers; sounds like it is showing 150K or more.

Options: ReplyQuote


Subject
Views
Written By
Posted
1505
August 04, 2015 08:47AM
Re: Select last date check all rows
705
August 05, 2015 05:49PM
615
August 06, 2015 10:36PM
693
August 08, 2015 11:11AM


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.