Hi all,
At work I maintain a Django backend that handles high-frequency sensor data. Charting long time ranges was a real problem for us: pulling millions of rows to draw a line that is ~1200px wide is slow, heavy on memory, and pointless, since the screen can’t show more than a few thousand points anyway.
We ended up writing our own downsampling and pre-aggregation layer. It works, but it took real effort to get right (late data, memory limits, keeping peaks visible), and I suspect many teams are writing the same thing from scratch.
So I’m curious how others handle this:
- Where does your time-series data live? Plain Postgres, TimescaleDB, Parquet files + DuckDB, something else?
- When a user asks for a chart over weeks or months, what do you do? Return all rows, aggregate per hour/day, downsample (LTTB, M4…), or something custom?
- If you’re on a managed Postgres without TimescaleDB (RDS, Cloud SQL…), how did you solve it?
- What was the most painful part?
I’m considering building an open-source package for this (efficient downsampling + rollups + automatic resolution selection, for both Postgres and Parquet/DuckDB), but first I want to understand whether this is a common pain or just ours.
Thanks!