Samples
In this sample, you convert theconditions table to a with
partitioning on the time column. You then specify and enable additional
columns to track ranges for. You then disable range tracking:
Best practice is to enable range tracking on columns which are correlated to the
partitioning column. In other words, enable tracking on secondary columns that are
referenced in the
WHERE clauses in your queries.
Use this API to disable range tracking on columns when the query patterns don’t
use this secondary column anymore.Arguments
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
hypertable | REGCLASS | - | ✔ | Hypertable that the column belongs to |
column_name | TEXT | - | ✔ | Column to disable tracking range statistics for |
if_not_exists | BOOLEAN | FALSE | ✖ | Set to true so that a notice is sent when ranges are not being tracked for a column. By default, an error is thrown |
Returns
| Column | Type | Description |
|---|---|---|
hypertable_id | INTEGER | ID of the hypertable in TimescaleDB. |
column_name | TEXT | Name of the column range tracking is disabled for |
disabled | BOOLEAN | Returns true when tracking is disabled. false when if_not_exists is true and the entry was not removed |
To
disable_chunk_skipping(), you must have first called enable_chunk_skipping
and enabled range tracking on a column in the hypertable.