MySQL Forums
Forum List  »  General

Re: Time series database design
Posted by: Rick James
Date: June 12, 2009 09:53AM

Sure purists say normalize time. That is a big mistake. Generally, "continuous" values should not be normalized because you generally want to do range queries on them. If it is normalized, performance will be orders of magnitude worse.

Normalization has several purposes; they don't really apply here:

* Save space -- a timestamp is 4 bytes; a MEDIUMINT for normalizing is 3; not much savings

* To allow for changing the common value (eg changing "International Business Machines" to "IBM" in one place) -- not relevent here; each time was independently assigned, and you are not a Time Lord.

* In the case of datetime, the normalization table could have extra columns like "day of week", "hour of day". Yeah, but performance still sucks.

Options: ReplyQuote


Subject
Written By
Posted
Re: Time series database design
June 12, 2009 09:53AM


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.