MySQL Forums
Forum List  »  General

Re: Aggregate intraday data
Posted by: Rick James
Date: January 16, 2014 07:15PM

Another thing... It looks like you are using CHAR for `date` and `time` -- that is (generally) a bad idea. It makes it very difficult to perform arithmetic, and may make it difficult to implement Peter's suggestions.

There are datatypes for DATE, TIME, and DATETIME.

Also, have you thought about what happens on short trading days?

Further, I suggest you do this aggregation every night for a single day's data, then put that into a 'summary' table. Why? Eventually, your table will be huge, and the query will have to hit the disk a lot, and performance will be bad. Such a summary table will be much faster for this particular query.

Options: ReplyQuote


Subject
Written By
Posted
January 15, 2014 10:16AM
January 15, 2014 11:33AM
January 16, 2014 03:24AM
Re: Aggregate intraday data
January 16, 2014 07:15PM
January 17, 2014 04:56AM
January 17, 2014 02:25PM
January 30, 2014 06:49AM
January 16, 2014 07:10PM
January 17, 2014 04:36AM


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.