Re: Partition Pruning
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.
Subject
Views
Written By
Posted
4093
September 17, 2010 06:04AM
1575
September 17, 2010 06:43AM
1705
September 21, 2010 02:41PM
1588
September 21, 2010 04:33PM
1586
September 23, 2010 09:17AM
Re: Partition Pruning
1713
September 28, 2010 10:51AM
1514
September 28, 2010 04:52PM
2143
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.