MySQL Forums
Forum List  »  Partitioning

Re: After partition also select is scanning all the partitions - need help
Posted by: Rick James
Date: September 24, 2010 10:06PM

No fair -- you keep changing the dates.

mysql> select count(*) from ServerPerfStore where Date='2010-09-17' \G
*************************** 1. row ***************************
count(*): 399
-- versus --
mysql> select * from mytable where mytime >= '2010-09-04 00:00:00' and mytime <= '2010-09-07 00:00:00';
8162 rows in set (0.08 sec)

And even the table!

By the way, you probably don't want to include midnight in
and mytime <= '2010-09-07 00:00:00'

Looks like you can do just this for experimenting further:
SHOW SESSION STATUS LIKE 'Handler_read_next';

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: After partition also select is scanning all the partitions - need help
1834
September 24, 2010 10:06PM


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.