Reputation: 3770
Today I read on Hackernews about BRIN indexing with PostgreSQL.
We are working with TimescaleDB for large and simple sensor data series.
Does BRIN indexing in TimescaleDB give additional value or do TimescaleDB features make BRIN indexing obsolete?
Upvotes: 1
Views: 1598
Reputation: 247950
TimescaleDB is just a thin layer that speeds up inserting into partitions, it doesn't boost your queries to the best of my knowledge.
BRIN indexes are only useful in the case when the logical ordering of the rows according to a column is the exact same (or the exact opposite) of the physical ordering of the rows.
In practice, that means that rows have to be inserted in the same order as the column in question (e.g., earlier timestamps get inserted before later ones), and there is never an UPDATE
or DELETE
.
If this is the case, you can use a BRIN index on that column, which will take almost no space.
Upvotes: 1