Automatically created indexes
When you create a , an index is automatically created for eachGROUP BY column. The index is a
composite index, combining the GROUP BY column with the time_bucket column.
For example, if you define a view with GROUP BY device, location, bucket, two composite indexes
are created: one on {device, bucket} and one on {location, bucket}.
Turn off automatic index creation
To turn off automatic index creation, settimescaledb.create_group_indexes to false when you create the
.
For example:
Manually create and drop indexes
You can use a regular statement to create or drop an index on a . For example, to create an index onavg_temp for a materialized hypertable named weather_daily:
_timescaledb_internal schema, where the data is stored. To drop the
index, specify the schema. For example, to drop the index avg_temp_idx, run: