MySQL Forums
Forum List  »  Partitioning

Re: After partition also select is scanning all the partitions - need help
Posted by: Rick James
Date: September 25, 2010 01:27PM

When timing a query, add SQL_NO_CACHE, run the query twice, and report the second run. This avoids the Query cache, which can immensely skew the timings, and lets the disk reads be cached otherwise.

Do not trust EXPLAINs estimates, only trust the "nnnn rows in set" at then end of the SELECT for how many rows it _returns_.

For the number of rows touched, trust "Rows examined" in the slowlog. The delta of 'Handler_read_next' is possibly the same value.

On another note, is there nothing in the 11pm hour? <= '2010-09-06 23:00:00'

There is a feature/bug wherein PARTITIONing often looks at the _first_ PARTITION. Does PART_20100817000000 have anything in it? A slight improvement would be to create a dummy first partition that is empty.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: After partition also select is scanning all the partitions - need help
1538
September 25, 2010 01:27PM


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.