3 ms·
> Is it ok to have one record per hour with sixty columns for each minute ? No. That's wasteful and makes many types of queries very hard to write. A good way
by bjourne 11y ago
> Is it ok to have one record per hour with sixty columns for each minute ?
No. That's wasteful and makes many types of queries very hard to write.
A good way of storing the data is only storing change events. So for example, each time a stock ticker changes you store a new row with the timestamp and the new value for the stock. This achieves very high level of "compression" since most stocks values doesn't change every minute. But it depends on what kind of data you have.
- thewarrior 11y agoWe have start and stop events for thousands of machines in order to measure their per hour / per minute utilizations .
- mandeepj 11y ago> since most stocks values doesn't change every minute. Are you serious? Stock data changes every second and sometimes earlier than that.
- bjourne 11y agoNo, most stock prices doesn't change that frequently.