MySQL Forums
Forum List  »  Partitioning

Re: Partition Pruning
Posted by: Shawn Taylor
Date: September 21, 2010 02:41PM

My *guess* is that it is because you have a data range that spans both of them.

| partitioned_table | pt_201007      | 734350                | 2010-08-01 |          1 |
| partitioned_table | pt_201008      | 734381                | 2010-09-01 |          1 |

If your query looked like:

EXPLAIN PARTITIONS 
  SELECT COUNT(*) 
  FROM   partitioned_table
  WHERE  created_dtm >= '2010-08-01' 
  AND    created_dtm  < '2010-08-31';

It should only try to hit one.

Shawn

Options: ReplyQuote


Subject
Views
Written By
Posted
4154
September 17, 2010 06:04AM
1596
September 17, 2010 06:43AM
Re: Partition Pruning
1719
September 21, 2010 02:41PM
1604
September 21, 2010 04:33PM
1606
September 23, 2010 09:17AM
1728
September 28, 2010 10:51AM
1534
September 28, 2010 04:52PM
2170
September 29, 2010 04:49AM


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.