4 ms·
We're using TimescaleDB to store log events - so each row has a timestamp, some properties, and a log message. And a lot of that is actually in a JSONB column.
by GordonS 5y ago
We're using TimescaleDB to store log events - so each row has a timestamp, some properties, and a log message. And a lot of that is actually in a JSONB column.
Not the archetypal time series use case, but TimescaleDB is still really useful.
TSDB's compression means we can store a huge volume of data in a fraction of the space of a standard Postgres table. You can achieve even better compression ratios and performance if you spend time designing your schema carefully, but honestly we didn't see the need, as just throwing data in gets us something like 10:1 compression and great performance.
TSDB's chunked storage engine means that queries along chunking dimensions (e.g. timestamp) are super-fast, as it knows exactly which files to read.
Chunking also means that data retention policies execute nearly instantaneously, as it's literally just deleting files from disk, rather than deleting rows one-by-one - millions of rows are gone in an instant!
And best of all, this all works in Postgres, and we can query TSDB data just the same as regular data.
All that combined easily justified the decision to use TSDB - and if you're familiar with Postgres, it's actually really simple to get started with. Really, we'd of needed a business justification not to use it!
Much love for the TimescaleDB team!
- sam0x17 5y agoSo services like Sentry / Honeybadger / etc probably use this architecture?
- GordonS 5y agoI think most online logging SaaS services actually use ElasticSearch.
- RhodesianHunter 5y agoI know that at least two of the top ten use ClickHouse.
- akulkarni 5y agoStackGres by Ongres, which achieved 1.0.0 status today, is another example of someone storing logs in TimescaleDB: https://twitter.com/ongresinc/status/1451194886795849742 https://twitter.com/ongresinc/status/1451194886795849742 (Also, thank you GordonS for the kind words!)
- LoriP 5y agoI know this is not on topic but thank you! We'd love to know more about what you do with TimescaleDB if you should want to share.