Time-Series Data Ingestion and Querying
What is Time-Series Data
Time-series data refers to a sequence of data points collected over time intervals, typically consisting of measurements taken at successive points in time. This type of data is analyzed to track changes, recognize trends, and predict future patterns based on historical data
Type of Time-series in ClapDB
timestamp, timestmaptz, date, time, interval please check data types
The working sceniaroes of Time-Series Data
Time-series data is generally used for selection, mainly to choose intervals or to segment into buckets according to intervals, in order to analyze the trend changes of other indicators.
Time-Series Data Ingestion
DDL
DDL should ensure that a time-series table has only one time related column, and the column should be indexed, just like normal pg table.
Ingesting
Ingesting time-series data is same as other type data in ClapDB
Time-Series Data Querying
Query distinct count of a time range.
Let’s see the following fake example.
group by time interval is very important in Time-series Query, there are 2 functions can be used:
- date_trunc
- date_bin
just like PostgreSQL;
examples:
Time-Series Functions and Operators
TODO