问题
I have a huge time series dataset that I'd like to graph. The time series spans back 5 years. From a backend standpoint, what are the common approaches to displaying this data at various resolutions (intervals)? Essentially I would like to chart data like this:
https://bitcoinwisdom.com/markets/bitstamp/btcusd
I'd like to offer the user the ability to select a time interval (seconds, minutes, hours, days, months, years). How is this data typically aggregated and stored? Would I want to store a table for each time interval and precompute this data? I figure I will need some regularly running job to combine all this data. Where does caching come into play? How would people imagine bitcoinwisdom is able to recall historical bitcoin prices for various time ranges so quickly? I looked at their backend and the API to fetch prices allows the user to specify intervals. How do they recall that data so quickly? It must be precomputed and stored somehow.
来源:https://stackoverflow.com/questions/38513382/data-aggregation-and-caching-how-to-quickly-graph-large-time-series-datasets-by