MySQL Forums
Forum List  »  Partitioning

Re: Partition Pruning
Posted by: Andrew McGhie
Date: September 23, 2010 09:17AM

Rick James Wrote:
-------------------------------------------------------
> pt_201005,pt_201008
>
> It is a feature/bug... NULLs go into the _first_
> partition. Queries tend to check for NULLs
> (sometimes when it should know that is
> impossible), hence the probe into pt_201005.

I figured it was a "feature" as I'd also tried adding an additional "created_dtm IS NOT NULL" predicate to the WHERE clause so the query read:

EXPLAIN PARTITIONS
  SELECT COUNT(*) 
  FROM   partitioned_table
  WHERE  created_dtm >= '2010-08-01' 
  AND    created_dtm  < '2010-09-01' 
  AND    event_dtm IS NOT NULL;

But still MySQL attempts to read from the 'pt_201005' partition. Perhaps they'll fix in in v6!?

Options: ReplyQuote


Subject
Views
Written By
Posted
3483
September 17, 2010 06:04AM
1388
September 17, 2010 06:43AM
1489
September 21, 2010 02:41PM
1417
September 21, 2010 04:33PM
Re: Partition Pruning
1409
September 23, 2010 09:17AM
1495
September 28, 2010 10:51AM
1316
September 28, 2010 04:52PM
1931
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.