v.25.6New Feature
TimeSeries* helper functions to speedup some scenarios
timeSeries*helper functions to speedup some scenarios when working with time series data: - re-sample the data to the time grid with specified start timestamp, end timestamp and step - calculate PromQL-likedelta,rate,ideltaandirate. #80590 (Alexander Gololobov).
Why it matters
This feature addresses the need for streamlined and efficient time series data handling in ClickHouse. It simplifies common operations like resampling data points within a defined time range and step, and computing standard time series metrics similar to Prometheus Query Language (PromQL). This helps users analyze and transform time series data more easily and with better performance.How to use it
Users can leverage the newtimeSeries* functions by specifying parameters such as start timestamp, end timestamp, and step duration to resample their time series data. Additionally, the PromQL-like functions (delta, rate, idelta, irate) can be applied directly to compute relevant metrics over the series. These functions are used within SQL queries, for example:SELECT timeSeriesResample(time_series_column, start, end, step) FROM table;
SELECT timeSeriesDelta(time_series_column) FROM table;