MySQL Forums
Forum List  »  Partitioning

Re: Select doesn't use the different partitions?
Posted by: Alan Griffiths
Date: August 14, 2009 09:16AM

Partition pruning on datetime columns is only supported for the functions TO_DAYS() and YEAR(). It is stated in the manual http://dev.mysql.com/doc/refman/5.1/en/partitioning-pruning.html

I have submitted a feature request to add DAY() and MONTH() to this list. Not sure if it will every get implemented. http://bugs.mysql.com/bug.php?id=45350

I got round this by adding an additional column to store month as an integer value. It makes the table slight bigger and the queries a bit more complicated, but I couldn't think of another way to do it.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Select doesn't use the different partitions?
1869
August 14, 2009 09:16AM


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.