MySQL Forums
Forum List  »  Partitioning

Re: Partition pruning when partition expression contains a function
Posted by: Mikael Ronström
Date: April 12, 2006 12:02PM

Hi,
There are range optimisations for LIST partitions implemented and there is also
a special range optimisation for hash partitions.

The range optimisations is an interesting mathematical problem. You'll find a
number of comments in the MySQL Server code that explains the optimisations
that are employed.

DAYOFWEEK has a problem in that it isn't strictly increasing or decreasing over
date. Thus DATE > 'x' AND DATE < 'y' doesn't really give much help on knowing
which partition the data is in. DAYOFWEEK(date) > 'monday' AND DAYOFWEEK(date) <
'thursday' would. This will most likely be supported at the same time as MySQL
supports function indexes.

Rgrds Mikael

Partha Dutta wrote:
> What about non range partitions (such as LIST).
> Any plans on optimizations for other functions,
> such as DAYOFWEEK, etc? It would be very nice to
> partition based on datetime columns, and the most
> useful partitions are by day, month, hour,
> etc...
>

Mikael Ronstrom
Senior Software Architect, MySQL AB
My blog: http://mikaelronstrom.blogspot.com

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Partition pruning when partition expression contains a function
2563
April 12, 2006 12:02PM


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.