MySQL Forums
Forum List  »  Partitioning

Re: Partition Pruning
Posted by: Mattias Jonsson
Date: September 28, 2010 10:51AM

The problem is that TO_DAYS() of an invalid date is NULL. 2010-02-31 is between 2010-02-01 and 2010-03-01, and TO_DAYS('2010-02-31') is NULL which is contained in the first partition, so that partition must also be searched.
What could be done is to add an optimization in the range pruning step to see that there are no possible 'invalid' dates in the range, and then skip the first (NULL) partition. (Feel free to add a feature request in bugs.mysql.com, not as a bug, since it is not: see bug#49754 :)

So currently the workaround is to create a specific first partition to contain all these invalid dates to speed up the search.

Options: ReplyQuote


Subject
Views
Written By
Posted
4154
September 17, 2010 06:04AM
1596
September 17, 2010 06:43AM
1719
September 21, 2010 02:41PM
1604
September 21, 2010 04:33PM
1606
September 23, 2010 09:17AM
Re: Partition Pruning
1727
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.