Partition on day of year
Hi,
I am having trouble understanding this scenario:
| test_jobs2 | CREATE TABLE `test_jobs2` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`customer_id` int(11) NOT NULL,
`printer_name` varchar(100) NOT NULL,
`job_date_time` datetime NOT NULL,
`username` varchar(100) NOT NULL,
`pages_printed` int(4) NOT NULL,
PRIMARY KEY (`id`,`job_date_time`),
KEY `search` (`customer_id`,`job_date_time`,`printer_name`,`username`)
) ENGINE=MyISAM AUTO_INCREMENT=100001 DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH ( TO_DAYS(`job_date_time`))
PARTITIONS 366 */ |
But when I run this explain partitions query:
mysql> explain partitions select * from test_jobs2 where job_date_time > '2011-01-01' and job_date_time < '2011-01-01 23:59:59'\G
The output shows it hitting all the partitions instead of the expected single partition.
Can someone help?
Subject
Views
Written By
Posted
Partition on day of year
8270
February 28, 2011 07:18PM
2807
February 28, 2011 08:43PM
4002
March 01, 2011 12:53AM
2484
March 01, 2011 10:33PM
2377
March 02, 2011 10:00AM
1989
March 02, 2011 11:16AM
2148
March 03, 2011 09:47PM
2586
March 04, 2011 08:58AM
2038
March 04, 2011 10:45AM
2581
March 04, 2011 08:23PM
1754
March 02, 2011 02:58AM
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.