Time Series Database
时许数据库(time series database) 指专门为时序分析(time series analytics)优化的数据库,时序数据是指按时间顺序排布的数据点。
时序数据库与 OLAP 数据库存在如下差异:
- 时序数据库写入更频繁,而 OLAP 数据库往往需要批处理摄取数据
- 时序数据库更注重最新数据,对于历史数据其价值会迅速贬值;而 OLAP 数据库数据价值变化不会那么陡峭
- 时序数据库查询往往要求低延迟,比如 100ms;而 OLAP 大多查询是极其复杂的聚合分析,耗时忍受度更高
- OLAP 数据库查询会有更多的 filter、聚合甚至窗口函数
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order.
Time series analysis comprises methods for analyzing time series data in order to extract meaningful statistics and other characteristics of the data.[1]
A time series database is a software system that is optimized for storing and serving time series through associated pairs of time(s) and value(s).[2]
Time series databases are very write-heavy. The volume of writes can be as high as 10s of millions of writes per second. While OLAP databases are write heavy, the number of writes per second is not O(millions). As a result, at large write volumes, OLAP databases tend to prefer batch ingestion instead of an event stream ingestion.[3]
Use cases with heavy use of filters and aggregations (slice and dice) over several dimensions is, imho, a OLAP use case.
Use timeseries if the timestamp is the most important feature and you seldomly aggregate/filter over other dimensions.[4]
-- ZenCoding