MySQL Forums
Forum List  »  Partitioning

Re: Partition by year and month
Posted by: IGGt .
Date: December 13, 2010 08:25AM

That's basically what I have settled on I think,

PARTITION BY RANGE( TO_DAYS(RecTime) ) (
PARTITION rx2009xx VALUES LESS THAN( TO_DAYS('2010-01-01 00:00:00') ),
PARTITION rx201001 VALUES LESS THAN( TO_DAYS('2010-02-01 00:00:00') ),
PARTITION rx201002 VALUES LESS THAN( TO_DAYS('2010-03-01 00:00:00') ),
PARTITION rx201003 VALUES LESS THAN( TO_DAYS('2010-04-01 00:00:00') ),
PARTITION rx201004 VALUES LESS THAN( TO_DAYS('2010-05-01 00:00:00') ),
PARTITION rx201005 VALUES LESS THAN( TO_DAYS('2010-06-01 00:00:00') ),
PARTITION rx201006 VALUES LESS THAN( TO_DAYS('2010-07-01 00:00:00') ),
PARTITION rx201007 VALUES LESS THAN( TO_DAYS('2010-08-01 00:00:00') ),
PARTITION rx201008 VALUES LESS THAN( TO_DAYS('2010-09-01 00:00:00') ),
PARTITION rx201009 VALUES LESS THAN( TO_DAYS('2010-10-01 00:00:00') ),
PARTITION rx201010 VALUES LESS THAN( TO_DAYS('2010-11-01 00:00:00') ),
PARTITION rx201011 VALUES LESS THAN( TO_DAYS('2010-12-01 00:00:00') ),
PARTITION rx201012 VALUES LESS THAN( TO_DAYS('2011-01-01 00:00:00') ),
PARTITION rx2011 VALUES LESS THAN MAXVALUE


It's just that there is going to be about 4 years of data in there by the time I have finished, so I thought that sub partitions may be a bit neater.

Options: ReplyQuote


Subject
Views
Written By
Posted
23196
December 07, 2010 08:35AM
8451
December 08, 2010 10:01PM
7453
December 13, 2010 03:07AM
6841
December 13, 2010 08:22AM
Re: Partition by year and month
7100
December 13, 2010 08:25AM


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.