Re: Pruning problem.
EXPLAIN PARTITIONS
SELECT * FROM test
WHERE date_ril = '2008-08-07';
id: 1
select_type: SIMPLE
table: test
partitions: y09_y09sp0
type: index
key: PRIMARY
key_len: 7
rows: 212
The data are take from the right subpartition
But when i try this query or similar (also with use of < and >):
EXPLAIN PARTITIONS
SELECT * FROM test
WHERE date_ril BETWEEN '2008-08-07' AND '2008-08-10';
id: 1
select_type: SIMPLE
table: test
partitions: y09_y09sp0,y09_y09sp1,y09_y09sp2,y09_y09sp3,y09_y09sp4,y09_y09sp5,y09_y09sp6,y09_y09sp7,y09_y09sp8,y09_y09sp9,y09_y09sp10,
y09_y09sp11,y09_y09sp12,y09_y09sp13,y09_y09sp14,y09_y09sp15,y09_y09sp16,y09_y09sp17,y09_y09sp18,y09_y09sp19,y09_y09sp20,
y09_y09sp21,y09_y09sp22,y09_y09sp23,y09_y09sp24,y09_y09sp25,y09_y09sp26,y09_y09sp27,y09_y09sp28,y09_y09sp29,y09_y09sp30,
y09_y09sp31,y09_y09sp32,y09_y09sp33,y09_y09sp34,y09_y09sp35,y09_y09sp36,y09_y09sp37,y09_y09sp38,y09_y09sp39,y09_y09sp40,
y09_y09sp41,y09_y09sp42,y09_y09sp43,y09_y09sp44,y09_y09sp45,y09_y09sp46,y09_y09sp47,y09_y09sp48,y09_y09sp49,y09_y09sp50,
y09_y09sp51,y09_y09sp52
type: index
key: PRIMARY
key_len: 7
rows: 212
The pruning doesn't work and the query take from all 53 subpartition but i know that the subpartition involved are only 2. Some bug in partition pruning?
Thanks a lot for your help.