timescale / timescaledb

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
https://www.timescale.com/
Other
17.79k stars 884 forks source link

Resultset downsampling #479

Closed sanpa1977 closed 2 years ago

sanpa1977 commented 6 years ago

As real time timeseries datasets can be large and visualizing the same on any browser based technology creates a huge load on the client browsers, it would be good to have the possibility of Downsampling feature within the query itself; such as Largest-Triangle-Three Bucket Downsampling or Douglas Peucker Reduction. This will help reducing the output of data in the sql response itself.

est commented 6 years ago

when downsampling, can we choose to fill null with 0 or previous values?

jedwards1211 commented 6 years ago

Or just min/max in each bucket, which avoids losing peaks and valleys

AndyMender commented 6 years ago

Usually, I restrict the sample size by either limiting the boundaries of the time window or bucketing, though it does in fact sound like a potent feature :).

harshajayaweeraXHJ commented 4 years ago

Is this feature available yet?

markfarnan commented 4 years ago

+1 for supporting LTTB as part of time_bucket or time_bucket_gapfill

svenklemm commented 2 years ago

This is available in the toolkit extension: https://docs.timescale.com/api/latest/hyperfunctions/downsample/