MySQL Forums
Forum List  »  Partitioning

why explain partition shows first partition in every select query?
Posted by: Aamir Sohail
Date: May 27, 2014 07:18AM

Hii,

I have a table named edr on mysql 5.1.6* version. I have partitioned the table using alter -

ALTER TABLE edr PARTITION BY RANGE (TO_DAYS(eventDate))
(
PARTITION apr25 VALUES LESS THAN (TO_DAYS('2014-04-26')),
PARTITION apr26_30 VALUES LESS THAN (TO_DAYS('2014-05-01')),
PARTITION may01_05 VALUES LESS THAN (TO_DAYS('2014-05-06')),
PARTITION may06_10 VALUES LESS THAN (TO_DAYS('2014-05-11')),
PARTITION may11_15 VALUES LESS THAN (TO_DAYS('2014-05-16')),
PARTITION may16_20 VALUES LESS THAN (TO_DAYS('2014-05-21')),
PARTITION may21_25 VALUES LESS THAN (TO_DAYS('2014-05-26')),
PARTITION may26_31 VALUES LESS THAN (TO_DAYS('2014-06-01')),
PARTITION june01_05 VALUES LESS THAN (TO_DAYS('2014-06-06')),
PARTITION june06_10 VALUES LESS THAN (TO_DAYS('2014-06-11')),
PARTITION june11_15 VALUES LESS THAN (TO_DAYS('2014-06-16')));

now when I am running any query for example:

explain partitions select count(*) from edr where eventdate > '2014-05-21';

it gives me output for partitions as - apr25,may21_25, may26_31, jun01_05, jun_06_10, jun11_15.
Here in partition apr25 there is no record for such where condition.

please let me know is any thing wrong in above query or its a partition problem.

Options: ReplyQuote


Subject
Views
Written By
Posted
why explain partition shows first partition in every select query?
2368
May 27, 2014 07:18AM


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.