Queries the pre-downsampling rules configured for one or all tables in LindormTSDB.
Applicable engines and versions
LindormTSDB (all versions)
Syntax
SHOW PREDOWNSAMPLES [ ON table_identifier ]Parameters
| Parameter | Required | Description |
|---|---|---|
table_identifier | No | The name of the table whose pre-downsampling rules to query. If omitted, rules for all tables are returned. |
Examples
Query pre-downsampling rules for all tables
SHOW PREDOWNSAMPLES;Output:
+--------+----------+------------+-----+----------------------+
| table | interval | aggregator | ttl | update_time |
+--------+----------+------------+-----+----------------------+
| sensor | 1h | sum, max | 90d | 2021-10-10T08:00:00Z |
| sensor | 5m | sum, max | 30d | 2021-10-10T08:00:00Z |
| test | 1m | sum, max | 30d | 2021-10-10T08:00:00Z |
| test | 2h | sum, max | 30d | 2021-10-10T08:00:00Z |
+--------+----------+------------+-----+----------------------+Query pre-downsampling rules for a specific table
SHOW PREDOWNSAMPLES ON sensor;Output:
+--------+----------+------------+-----+----------------------+
| table | interval | aggregator | ttl | update_time |
+--------+----------+------------+-----+----------------------+
| sensor | 1h | sum, max | 90d | 2021-10-10T08:00:00Z |
| sensor | 5m | sum, max | 30d | 2021-10-10T08:00:00Z |
+--------+----------+------------+-----+----------------------+Each row in the result represents one pre-downsampling rule. The result columns are:
| Column | Description |
|---|---|
table | The name of the table. |
interval | The downsampling interval (for example, 1h, 5m). |
aggregator | The aggregation functions applied during downsampling (for example, sum, max). |
ttl | The Time to Live (TTL) of the downsampled data (for example, 90d). |
update_time | The time when the rule was last updated, in UTC. |