MySQL Forums
Forum List  »  Partitioning

Re: Partitions outside of date range is included
Posted by: Mattias Jonsson
Date: March 24, 2010 09:30AM

Yes, this is because TO_DAYS(date_col) will return NULL for invalid dates, and NULL values are always stored in the first partition.

Also see this post:,281178,282536

[20 Aug 13:47] Mattias Jonsson

When fixing this bug it will also change the pruning a bit:
For range partitioning, it must also include the first partition (holding the NULL values)
for queries using range search (i.e. <, >, <=, >=, BETWEEN) to be able to find 'virtual'
dates like '2000-00-00'.

This can affect performance for range partitioned tables on TO_DAYS() that have a large
first partition. Work around is to create a first partition with VALUES LESS THAN (0).

Options: ReplyQuote

Written By
Re: Partitions outside of date range is included
March 24, 2010 09:30AM

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.