MySQL Forums
Forum List  »  InnoDB

Re: Slow query log 'Rows_examined' vs 'explain select' rows
Posted by: Rick James
Date: January 10, 2013 08:56PM

Please provide SHOW CREATE TABLE so we don't have to guess.

Do you have an index _starting_ with vss_datelastvisited ?

Sometimes InnoDB gets the "statistics" wrong, and does a table scan when it clearly should not. 5.6 has some features that _may_ provide relief from that.

The EXPLAIN will use the current statistics, and may not reflect the actual query plan used.

Something like this:
PARTITION BY RANGE (TO_DAYS(vss_datelastvisited))
would make it run faster, even when it goes berserk.

Tips on PARTITIONing -- see start of

Did you notice that your timespan is 1 second shy of a whole number of hours?

Options: ReplyQuote

Written By
Re: Slow query log 'Rows_examined' vs 'explain select' rows
January 10, 2013 08:56PM

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.