All Products
Search
Document Center

Lindorm:SHOW PREDOWNSAMPLES

Last Updated:Mar 19, 2024

You can use the SHOW PREDOWNSAMPLES syntax to query pre-downsampling rules configured for a table.

Applicable engines and versions

The SHOW PREDOWNSAMPLES syntax is applicable only to all versions of LindormTSDB.

Syntax

SHOW PREDOWNSAMPLES [ ON table_identifier ]

Parameters

Parameter

Required

Description

table_identifier

No

The name of the table for which the pre-downsampling rules you want to query are configured.

Note

If you do not specify this parameter, pre-downsampling rules configured for all tables are returned by default.

Examples

  • Example 1: Query the pre-downsampling rules configured for all tables.

    SHOW PREDOWNSAMPLES;

    The following result is returned:

    +--------+----------+------------+-----+----------------------+
    | 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 |
    +--------+----------+------------+-----+----------------------+
  • Example 2: Query the pre-downsampling rules configured for a table named sensor.

    SHOW PREDOWNSAMPLES ON sensor;

    The following result is returned:

    +--------+----------+------------+-----+----------------------+
    | 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 |
    +--------+----------+------------+-----+----------------------+