MySQL Forums
Forum List  »  Partitioning

Re: Partitions didn`t work for me
Posted by: Igor Korsun
Date: November 22, 2007 05:51AM

KimSeong Loh Wrote:
-------------------------------------------------------
> Try TO_DAYS(), only YEAR() and TO_DAYS() are
> optimized for partition pruning, MONTH() is not
> optimized.


Hm... this realy works! Thanks, i whill try to measure performance!

ALTER TABLE tbl_result_1107296256_2
PARTITION BY RANGE (TO_DAYS(StartTime))
(
PARTITION p0 VALUES LESS THAN (TO_DAYS('2007-07-01')),
PARTITION p1 VALUES LESS THAN (TO_DAYS('2007-08-01')),
PARTITION p2 VALUES LESS THAN (TO_DAYS('2007-09-01')),
PARTITION p3 VALUES LESS THAN (TO_DAYS('2007-10-01')),
PARTITION p4 VALUES LESS THAN (TO_DAYS('2007-11-01')),
PARTITION p5 VALUES LESS THAN (TO_DAYS('2007-12-01'))
);



Edited 1 time(s). Last edit at 11/22/2007 09:01AM by Igor Korsun.

Options: ReplyQuote


Subject
Views
Written By
Posted
3898
November 22, 2007 04:52AM
3144
November 22, 2007 05:13AM
2771
November 22, 2007 05:17AM
Re: Partitions didn`t work for me
2759
November 22, 2007 05:51AM
2512
December 08, 2007 01:42AM


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.