14 ms·
You could take a look at Postgres + TimescaleDB extension, which offers a nice time_bucket() function on its hypertables[1]. You can also materialize using cont
by sohooo 3y ago
You could take a look at Postgres + TimescaleDB extension, which offers a nice time_bucket() function on its hypertables[1]. You can also materialize using continuous aggregates („self updating“ materialized views).
1: https://docs.timescale.com/api/latest/hyperfunctions/time_bucket/ https://docs.timescale.com/api/latest/hyperfunctions/time_bu...
- shrx 3y agoThanks, this looks exactly what I want. Sensible interval origins [1] too (January 1, 2000 for months and years, and January 3 2000, a Monday, for weeks) and also configurable. [1] https://docs.timescale.com/use-timescale/latest/time-buckets/about-time-buckets/ https://docs.timescale.com/use-timescale/latest/time-buckets...