All Products
Search
Document Center

Lindorm:DESCRIBE

Last Updated:Mar 28, 2026

Use DESCRIBE (or its alias DESC) to inspect the schema of a table or database. This is useful when you need to understand the structure of an existing object before creating a similar one.

Applicable engines

DESCRIBE is supported by LindormTable and LindormTSDB.

Syntax

{ DESCRIBE | DESC } [{ DATABASE | TABLE }] <identifier>

Omitting the TABLE keyword defaults to describing a table, not a database. To describe a database, you must explicitly specify DATABASE.

DATABASE is supported only in LindormTSDB. LindormTable does not support the DATABASE parameter.

Parameters

ParameterLindormTableLindormTSDBDescription
DATABASENot supportedSupportedReturns the schema of a database.
TABLESupportedSupportedReturns the schema of a table.
<identifier>SupportedSupportedThe name of the table or database. If DATABASE is specified, <identifier> is the database name. Otherwise, <identifier> is the table name.

Examples

The following examples use a sensor table created with this statement:

CREATE TABLE sensor (
    device_id  VARCHAR   NOT NULL,
    region     VARCHAR   NOT NULL,
    time       TIMESTAMP NOT NULL,
    temperature DOUBLE,
    humidity   BIGINT,
    PRIMARY KEY(device_id, region, time)
);

Get the schema of a table

DESCRIBE TABLE sensor;  -- Full form
DESC sensor;            -- Abbreviated form

LindormTable result

LindormTable returns one row per column with the following fields:

ColumnDescription
TABLE_SCHEMAThe schema (database) the table belongs to.
TABLE_NAMEThe table name.
COLUMN_NAMEThe column name.
TYPEThe column data type, such as VARCHAR, TIMESTAMP, DOUBLE, or BIGINT.
IS_PRIMARY_KEYWhether the column is part of the primary key. true or false.
SORT_ORDERThe sort order for primary key columns. ASC (ascending). Non-primary-key columns show none.
+--------------+------------+-------------+-----------+----------------+------------+
| TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME |   TYPE    | IS_PRIMARY_KEY | SORT_ORDER |
+--------------+------------+-------------+-----------+----------------+------------+
| default      | sensor     | device_id   | VARCHAR   | true           | ASC        |
| default      | sensor     | region      | VARCHAR   | true           | ASC        |
| default      | sensor     | time        | TIMESTAMP | true           | ASC        |
| default      | sensor     | temperature | DOUBLE    | false          | none       |
| default      | sensor     | humidity    | BIGINT    | false          | none       |
+--------------+------------+-------------+-----------+----------------+------------+

LindormTSDB result

LindormTSDB returns a different set of columns that reflect the time series data model. Each row represents one column with the following fields:

ColumnDescription
columnNameThe column name.
typeNameThe column data type, such as VARCHAR, TIMESTAMP, DOUBLE, or BIGINT.
columnKindThe role of the column in the time series model. TAG columns are dimension columns used for filtering and grouping. FIELD columns store the measured values. TIMESTAMP is the time column.
primaryKeyWhether the column is part of the primary key. true or false.
partitionTagWhether the column is used as a partition key. true or false.
+-------------+-----------+------------+------------+--------------+
| columnName  | typeName  | columnKind | primaryKey | partitionTag |
+-------------+-----------+------------+------------+--------------+
| device_id   | VARCHAR   | TAG        | true       | true         |
| region      | VARCHAR   | TAG        | true       | true         |
| time        | TIMESTAMP | TIMESTAMP  | true       | false        |
| temperature | DOUBLE    | FIELD      | false      | false        |
| humidity    | BIGINT    | FIELD      | false      | false        |
+-------------+-----------+------------+------------+--------------+

Get the schema of a database

This example describes a LindormTSDB database named DB1.

DESCRIBE DATABASE DB1;

LindormTSDB returns one row per database attribute with the following fields:

AttributeDefaultDescription
shard_num_per_node1The number of shards on each node.
skip_walfalseWhether write-ahead logging (WAL) is disabled. false means WAL is enabled and writes are logged.
string_compressionfalseWhether STRING column compression is enabled. false means STRING data is stored uncompressed.
shard_numThe total number of shards across the cluster. No default value.
cold_boundaryConfigured in CREATE DATABASE.
partition_intervalConfigured in CREATE DATABASE.
ttlConfigured in CREATE DATABASE.
+--------------------+-------+
|     attribute      | value |
+--------------------+-------+
| shard_num_per_node | 0     |
| skip_wal           | false |
| string_compression | false |
| cold_boundary      | 30    |
| partition_interval | 30    |
| ttl                | 60    |
| shard_num          | 0     |
+--------------------+-------+

For details on cold_boundary, partition_interval, and ttl, see CREATE DATABASE.