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
3444
September 17, 2010 06:04AM
1374
September 17, 2010 06:43AM
1476
September 21, 2010 02:41PM
1410
September 21, 2010 04:33PM
1397
September 23, 2010 09:17AM
Re: Partition Pruning
1483
September 28, 2010 10:51AM
1305
September 28, 2010 04:52PM
1913
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.