MySQL Forums
Forum List  »  InnoDB

Re: Slow query log 'Rows_examined' vs 'explain select' rows
Posted by: Rick James
Date: January 16, 2013 09:16AM

USE INDEX seems to have solved the problem. So, it was probably the statistics. I dislike "USE INDEX" because it tends to pin you in a solution that works for one case, but makes another case worse. Still, that may be the 'right' answer for your query.

One Rule of Thumb for partitioning -- Don't use it unless you have at least a million rows.
A partitioned table will take some extra disk space, but rarely more than a few percent or maybe 100MB.
Note: one of the RoTs says not to have very many partitions.

Both of these exclude :55 (Perhaps you want <= or >=, but not both)
<'2013-01-08 23:07:55'
>'2013-01-08 21:10:55

(Opinion) The "vss_" prefix on the fields (except the id) clutters queries and makes them hard to read. When JOINing, "vss." can be the alias; "vss.vss_..." is quite redundant.

Options: ReplyQuote

Written By
Re: Slow query log 'Rows_examined' vs 'explain select' rows
January 16, 2013 09:16AM

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.