MySQL Forums
Forum List  »  Partitioning

Re: range columns including datetime column
Posted by: Rick James
Date: August 19, 2012 10:55PM

> but period is (5-hourly, 4-daily, 3-weekly, 2-monthly, 1-yearly)

I would consider 5 separate tables, with separate purge policies.

With separate tables, you can change the datatypes, and possibly the number of columns, to be more appropriate. Hourly: DATETIME, Daily/Weekly/Monthly: DATE, Year: YEAR. Also, some fields may shift between MEDIUMINT to INT (etc.) Smaller datatypes --> more cacheable --> faster.

Usually Weekly stuff can be fetched directly from daily, and yearly directly from Monthly. This would cut it back to only 3 tables.

(Sorry, Mattias, for stepping on the new compound range feature, but I think it is inappropriately used here.)

Options: ReplyQuote


Subject
Views
Written By
Posted
2314
August 15, 2012 10:01PM
Re: range columns including datetime column
1278
August 19, 2012 10:55PM


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.