TimescaleDB — Time Series data on Postgres (Done Right)

 #TimescaleDB - https://github.com/timescale/timescaledb - is implemented as an extension on #Postgres, exposing your #TimeSeries data as regular tables, while under the hood, these are actually split out into multiple tables (chunks).
Each “chunk” is the time-series data partitioned by a time interval, and an optional partition key (location, user ID, device ID, etc)
The obvious advantage — dropping data more than a week old is waaaaay simpler (just drop old chunks!)
You also get
  • Higher ingest rates: you’re only writing to — and indexing! — the latest chunks, which means you don’t have to worry about memory/disk issues, indexing rates, vaccuming, etc. etc.
  • Query performance: as good as postgres, and better for time-series stuff (like “merge-append”)
  • Time-oriented features: “time-bucketing” with arbitrary intervals (“give me the sensor data in groups of 3 hours and 17 minutes”), last/first aggregates (“give me the last sensor data recorded in each interval”) etc.
It’s really good stuff, and most importantly, works just like postgres (after all, it is postgres!)
And did I mention that clobbering old data is easy — this, in and as of itself, makes it worth it to me 🙌
(•) Yeah, I was looking for a visually interesting image on Time Series data — this was the best I could come up with

Comments

Popular posts from this blog

Erlang, Binaries, and Garbage Collection (Sigh)

Spot The Difference — Deep Learning Edition