MySQL Forums
Forum List  »  Partitioning

Re: timestamp, datetime as default value as current_timestamp [PARTITION]
Posted by: Rick James
Date: August 30, 2012 10:35PM

For about 1% overhead, you could have both a DATETIME and a TIMESTAMP. (8+4 bytes)

Or, two TIMESTAMPs, one as a TIMESTAMP, one as an INT UNSIGNED -- and do range partitioning on the INT. (4+4 bytes)

I recommend weekly partitions instead of monthly, unless there is some significance to months in your app. That would lead to about 28 partitions, which I find is a better number.

Partitioning on DATETIME has the spurious checking of the first partition.

> What's the average length of these columns?
Apparently rather small, since the avg_row_length is in the ballpark of 352.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: timestamp, datetime as default value as current_timestamp [PARTITION]
1886
August 30, 2012 10:35PM


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.