Skip navigation links

MySQL Forums :: Partitioning :: Select doesn't use the different partitions?


Advanced Search

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
Select doesn't use the different partitions? 2626 Frank Schuster 07/28/2009 01:54AM
Re: Select doesn't use the different partitions? 1639 Alan Griffiths 08/14/2009 09:16AM
Re: Select doesn't use the different partitions? 1789 Allan Winston 08/15/2009 11:11PM


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.