Transaction per chunk indexes
Next to all regular Postgres indexes, TimescaleDB also supports transaction per chunk indexes.
Info
Consult the Timescale docs for more information regarding the usage of these indexes.
Usage
To create a transaction per chunk index, simply set the transaction_per_chunk
option to true
in the index configuration, similar to the unique
option.
models/my_hypertable.sql
{{ config(
materialized='hypertable',
main_dimension='time_column',
indexes=[
{'columns': ['column_a'], 'transaction_per_chunk': True}
]
}}
select ...
dbt_project.yml
models:
your_project_name:
model_name:
+materialized: hypertable
+main_dimension: time_column
+indexes:
- columns: ['column_a']
transaction_per_chunk: true
# ...
Info
Consult the dbt Postgres docs for more information regarding how indexes can be configured.