Kleyson Rios
Kleyson Rios

Reputation: 2877

TimescaleDB for unsorted data series

TimescaleDB fits very well for data series.

In my case, I'm working with data series but my data arrives not sorted.

Will TimescaleDB work in the same way compared with data coming sorted ?

Upvotes: 1

Views: 904

Answers (1)

Blagoj Atanasovski
Blagoj Atanasovski

Reputation: 863

TimescaleDB is a good solution for your problem. It does not put a constraint on data coming in a sorted fashion. Timescale partitions your data on a dimension of your choice, time being the most often example of a monotonous dimension (but any integer type can be used to partition the data). You specify a partition size (chunk size) and TimescaleDB creates new partitions automatically for each interval. As long as your data comes in the interval range of a few chunks, then the database can work with those chunks in memory, speeding up ingestion rates. It doesn't matter if the data comes in absolutely sorted. Because TimescaleDB is built on PostgreSQL it does not have an append-only storage model making it possible to even modify old data, or even back-fill without sacrificing performance.

Another benefits of using TimescaleDB:

  • Native compression, can reduce storage requirements up to 20x or 30x (and more depending on your data layout)
  • Data Tiering: attach tablespaces on slower storage, and automatically move old chunks to the slower storage
  • Continuous Aggreages: define materialized views that refresh automatically
  • Optimizations that efficiently prune out chunks that don't need to be scanned based on your query predicates, based on the partitioning you choose

Upvotes: 2

Related Questions