MySQL Forums
Forum List  »  Partitioning

Re: range columns including datetime column
Posted by: Mattias Jonsson
Date: August 16, 2012 09:35AM

Hi Rob,

what does the 'period' column stand for?

If you partition using:
PARTITION BY RANGE COLUMNS(start,period) instead, you could do

PARTITION p1205_123 VALUES LESS THAN ('20120601000000', 4),
PARTITION p1205_45 VALUES LESS THAN ('20120601000000', 6),
PARTITION p1205_6 VALUES LESS THAN ('20120601000000', MAXVALUE),
PARTITION p1206_123 VALUES LESS THAN ('20120701000000', 4),
PARTITION p1206_45 VALUES LESS THAN ('20120701000000', 6),
PARTITION p1206_6 VALUES LESS THAN ('20120701000000', MAXVALUE),

instead, but then you would need to always specify a partition for period 1-3.

It also depends on the type of queries you will run (i.e. will period and/or start be included in the WHERE clause, will it be ranges etc.)

Options: ReplyQuote


Subject
Views
Written By
Posted
2339
August 15, 2012 10:01PM
Re: range columns including datetime column
1239
August 16, 2012 09:35AM


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.