Skip to main content

Metadata

TDengine includes the built-in INFORMATION_SCHEMA database for accessing database metadata, system information, and status, such as database and table names and currently executing SQL statements. It contains multiple read-only tables. These tables are views rather than base tables and have no associated data files, so they can only be queried; write operations such as INSERT are not supported.

INFORMATION_SCHEMA provides, in a more consistent form, information equivalent to various SHOW commands, such as SHOW TABLES and SHOW DATABASES. Compared with SHOW, using SELECT ... FROM INFORMATION_SCHEMA.tablename has the following advantages:

  1. You can use USE to set INFORMATION_SCHEMA as the default database.
  2. You can use familiar SELECT syntax and only need to know the table and column names.
  3. You can filter and sort results and use any SELECT functionality supported by TDengine.
  4. Columns can be added to existing tables in the future without affecting existing applications.
  5. The query model is closer to the data dictionaries of other database systems, such as Oracle.
info
  • SHOW statements are retained for users who are familiar with them.
  • Some column names in system tables are keywords and must be escaped with backticks in queries. For example, to query the number of vgroups in the test database:
SELECT `vgroups` FROM information_schema.ins_databases WHERE name = 'test';

The following sections describe each table in INFORMATION_SCHEMA and its column structure.

INS_ANODES

Provides the address, status, creation time, and update time of analysis nodes (anodes). The same information can also be queried using SHOW ANODES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idINTID
2urlVARCHAR(128)URL
3statusVARCHAR(10)Current status
4create_timeTIMESTAMPCreation time
5update_timeTIMESTAMPUpdate time

INS_ANODES_FULL

Provides details about algorithms loaded on analysis nodes, including type, name, status, and notes. The same information can also be queried using SHOW ANODES FULL. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idINTID
2typeVARCHAR(24)Type
3algoVARCHAR(64)Algorithm
4statusVARCHAR(10)Current status
5noteVARCHAR(256)Notes

INS_ARBGROUPS

Provides information about replica dnodes, synchronization status, and assigned tokens in arbitrator groups. The same information can also be queried using SHOW ARBGROUPS. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1db_nameVARCHAR(64)Database name
2vgroup_idINTvgroup ID
3v1_dnodeSMALLINTv1_dnode
4v2_dnodeSMALLINTv2_dnode
5is_syncBOOLis_sync
6check_sync_codeVARCHAR(98)check_sync_code
7assigned_dnodeSMALLINTassigned_dnode
8assigned_tokenVARCHAR(32)assigned_token
9assigned_ackedSMALLINTassigned_acked

INS_BNODES

Provides the ID, address, protocol, and creation time of each bnode (bridge node) in the cluster. The same information can also be queried using SHOW BNODES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idINTID
2endpointVARCHAR(134)Address
3protocolVARCHAR(14)Protocol
4create_timeTIMESTAMPCreation time

INS_CLUSTER

Provides the current cluster ID, name, uptime, version, and license expiration time. The same information can also be queried using SHOW CLUSTER. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idBIGINTCluster ID
2nameVARCHAR(40)Cluster name
3uptimeINTUptime (seconds)
4create_timeTIMESTAMPCreation time
5versionVARCHAR(10)Version
6expire_timeTIMESTAMPExpiration time

INS_COLUMNS

Provides table-column names, types, lengths, precision, and the data sources of virtual-table columns.

#Column NameData TypeDescription
1table_nameVARCHAR(192)Table name
2db_nameVARCHAR(64)Name of the database containing the table
3table_typeVARCHAR(21)Table type
4col_nameVARCHAR(64)Column name
5col_typeVARCHAR(32)Column type
6col_lengthINTColumn length
7col_precisionINTColumn precision
8col_scaleINTColumn scale
9col_nullableINTWhether the column can be null
10col_sourceVARCHAR(258)Column data source. This value is present only for virtual-table columns and identifies the virtual table's data source as db_name.table_name.col_name
11col_idSMALLINTColumn ID

INS_COMPACTS

Provides the ID, target database, and start time of data compaction tasks. The same information can also be queried using SHOW COMPACTS.

#Column NameData TypeDescription
1compact_idINTCompaction task ID
2db_nameVARCHAR(64)Database name
3start_timeTIMESTAMPStart time

INS_COMPACT_DETAILS

Provides compaction-task details for each vgroup and dnode, including progress, completion status, and remaining time. The same information can also be queried using SHOW COMPACT.

#Column NameData TypeDescription
1compact_idINTCompaction task ID
2vgroup_idINTvgroup ID
3dnode_idINTdnode ID
4number_filesetINTnumber_fileset
5finishedINTfinished
6start_timeTIMESTAMPStart time
7progress(%)INTprogress(%)
8remain_time(s)BIGINTremain_time(s)

INS_CONFIGS

Provides the names and values of currently effective system configuration parameters. The same information can also be queried using SHOW CLUSTER VARIABLES.

#Column NameData TypeDescription
1nameVARCHAR(32)Configuration item name
2valueVARCHAR(64)Value of the configuration item. This column is a keyword and must be escaped with backticks in queries (for example, `value`).

INS_CPU_ALLOCATION

Provides CPU core allocation for management, write, and read threads on each dnode. The data is valid when enableCpuAffinity is enabled. The same information can also be queried using SHOW CPU_ALLOCATION. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1dnode_idINTDnode identifier
2thread_categoryVARCHAR(16)Thread category: management, write, or read
3coresINTNumber of CPU cores allocated to this category (0 when disabled)
4core_idsVARCHAR(256)Comma-separated list of assigned core IDs; "-" when disabled
5enabledBOOLWhether CPU affinity is enabled for this category

INS_DATABASES

Provides configuration and status information for user databases, such as replica count, retention policies, cache settings, and WAL-related parameters. The same information can also be queried using SHOW DATABASES.

#Column NameData TypeDescription
1nameVARCHAR(64)Database name
2create_timeTIMESTAMPCreation time
3vgroupsINTNumber of vgroups in the database. This column is a keyword and must be escaped with backticks in queries (for example, `vgroups`).
4ntablesBIGINTNumber of tables in the database, including subtables and regular tables but excluding supertables
5replicaTINYINTNumber of replicas. This column is a keyword and must be escaped with backticks in queries (for example, `replica`).
6strictVARCHAR(4)Deprecated parameter
7durationVARCHAR(10)Time span of data stored in a single file. This column is a keyword and must be escaped with backticks in queries (for example, `duration`). It is stored internally in minutes and may be displayed in days or hours in query results.
8keepVARCHAR(32)Data retention duration. This column is a keyword and must be escaped with backticks in queries (for example, `keep`). It is stored internally in minutes and may be displayed in days or hours in query results.
9bufferINTSize of each vnode write-cache memory block, in MB. This column is a keyword and must be escaped with backticks in queries (for example, `buffer`).
10pagesizeINTPage size of the metadata storage engine in each VNODE, in KB. This column is a keyword and must be escaped with backticks in queries (for example, `pagesize`).
11pagesINTNumber of cache pages in each vnode metadata storage engine. This column is a keyword and must be escaped with backticks in queries (for example, `pages`).
12minrowsINTMinimum number of records in a file block. This column is a keyword and must be escaped with backticks in queries (for example, `minrows`).
13maxrowsINTMaximum number of records in a file block. This column is a keyword and must be escaped with backticks in queries (for example, `maxrows`).
14compTINYINTData compression method. This column is a keyword and must be escaped with backticks in queries (for example, `comp`).
15precisionVARCHAR(2)Time precision. This column is a keyword and must be escaped with backticks in queries (for example, `precision`).
16statusVARCHAR(10)Database status
17retentionsVARCHAR(60)Data aggregation interval and retention duration. This column is a keyword and must be escaped with backticks in queries (for example, `retentions`).
18single_stableBOOLWhether only one supertable can be created in this database. This column is a keyword and must be escaped with backticks in queries (for example, `single_stable`).
19cachemodelVARCHAR(11)Whether recent subtable data is cached in memory. This column is a keyword and must be escaped with backticks in queries (for example, `cachemodel`).
20cachesizeINTAmount of memory in each vnode used to cache recent subtable data. This column is a keyword and must be escaped with backticks in queries (for example, `cachesize`).
21cacheshardbitsINTNumber of shard bits for the last-value LRU cache. The actual number of shards is 2^cacheshardbits; -1 means the system calculates it automatically from cachesize. This column is a keyword and must be escaped with backticks in queries (for example, `cacheshardbits`).
22wal_levelTINYINTWAL level. This column is a keyword and must be escaped with backticks in queries (for example, `wal_level`).
23wal_fsync_periodINTData flush period. This column is a keyword and must be escaped with backticks in queries (for example, `wal_fsync_period`).
24wal_retention_periodINTWAL retention duration, in seconds. This column is a keyword and must be escaped with backticks in queries (for example, `wal_retention_period`).
25wal_retention_sizeBIGINTWAL retention limit. This column is a keyword and must be escaped with backticks in queries (for example, `wal_retention_size`).
26stt_triggerSMALLINTNumber of persisted files that triggers file merging. This column is a keyword and must be escaped with backticks in queries (for example, `stt_trigger`).
27table_prefixSMALLINTLength of the prefix ignored when the internal storage engine assigns a VNODE for table data based on the table name. This column is a keyword and must be escaped with backticks in queries (for example, `table_prefix`).
28table_suffixSMALLINTLength of the suffix ignored when the internal storage engine assigns a VNODE for table data based on the table name. This column is a keyword and must be escaped with backticks in queries (for example, `table_suffix`).
29tsdb_pagesizeINTPage size in the time-series data storage engine. This column is a keyword and must be escaped with backticks in queries (for example, `tsdb_pagesize`).
30keep_time_offsetINTKEEP time offset
31ss_chunkpagesINTNumber of shared-storage chunk pages
32ss_keeplocalVARCHAR(10)Shared-storage local retention policy
33ss_compactTINYINTShared-storage compaction configuration
34with_arbitratorTINYINTWhether arbitration is enabled
35encrypt_algorithmVARCHAR(16)Encryption algorithm
36compact_intervalVARCHAR(12)Automatic compaction interval
37compact_time_rangeVARCHAR(24)Automatic compaction time range
38compact_time_offsetVARCHAR(4)Automatic compaction time offset
39is_auditBOOLWhether this is an audit database
40ownerVARCHAR(24)Owner
41allow_dropBOOLWhether deletion is allowed
42sec_levelTINYINTSecurity level

INS_DISK_USAGE

Summarizes disk usage for WAL, multi-tier storage, cache, and metadata by database and vgroup, in KB. The same information can also be queried using SHOW DISK_INFO.

#Column NameData TypeDescription
1db_nameVARCHAR(32)Database name
2vgroup_idINTvgroup ID
3wal_sizeBIGINTWAL file size, in KB
4data1BIGINTData-file size on primary storage, in KB
5data2BIGINTData-file size on secondary storage, in KB
6data3BIGINTData-file size on tertiary storage, in KB
7cache_rdbBIGINTSize of last/last_row files, in KB
8table_metaBIGINTMetadata file size, in KB
9ssBIGINTSpace used on shared storage, in KB
10raw_dataBIGINTEstimated raw-data size, in KB

INS_DNODES

Provides the ID, address, vnode capacity, and operating status of each dnode (data node) in the cluster. The same information can also be queried using SHOW DNODES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idINTdnode ID
2endpointVARCHAR(134)dnode Address
3vnodesSMALLINTActual number of vnodes. This column is a keyword and must be escaped with backticks in queries (for example, `vnodes`)
4support_vnodesSMALLINTMaximum number of supported vnodes
5statusVARCHAR(10)Current status
6create_timeTIMESTAMPCreation time
7reboot_timeTIMESTAMPMost recent restart time
8noteVARCHAR(256)Information such as the reason for being offline
9machine_idVARCHAR(24)Machine ID (Enterprise Edition)

INS_DNODE_VARIABLES

Provides configuration parameters on each dnode, including their scope, category, and description. The same information can also be queried using SHOW DNODE VARIABLES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1dnode_idINTdnode ID
2nameVARCHAR(32)Configuration item name
3valueVARCHAR(4096)Value of the configuration item. This column is a keyword and must be escaped with backticks in queries (for example, `value`).
4scopeVARCHAR(8)Configuration scope
5categoryVARCHAR(8)Configuration category
6infoVARCHAR(64)Configuration description

INS_ENCRYPTIONS

Provides the encryption-key status of each dnode. The same information can also be queried using SHOW ENCRYPTIONS. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1dnode_idINTdnode ID
2key_statusVARCHAR(12)key_status

INS_ENCRYPT_ALGORITHMS

Provides the names, types, sources, and descriptions of encryption algorithms available in the system. The same information can also be queried using SHOW ENCRYPT_ALGORITHMS.

#Column NameData TypeDescription
1idINTID
2algorithm_idVARCHAR(64)algorithm_id
3nameVARCHAR(64)Name
4descVARCHAR(128)Description
5typeVARCHAR(198)Type
6sourceVARCHAR(198)source
7ossl_algr_nameVARCHAR(64)ossl_algr_name

INS_ENCRYPT_STATUS

Provides the current encryption scope, algorithm, and encryption status. The same information can also be queried using SHOW ENCRYPT_STATUS.

#Column NameData TypeDescription
1encrypt_scopeVARCHAR(32)encrypt_scope
2algorithmVARCHAR(32)algorithm
3statusVARCHAR(16)Current status

INS_EXT_SOURCES

Provides connection information, database/schema, and options for external data sources used in federated queries. The same information can also be queried using SHOW EXTERNAL SOURCES.

#Column NameData TypeDescription
1source_nameVARCHAR(64)source_name
2typeVARCHAR(16)Type
3hostVARCHAR(256)Host
4portINTPort
5userVARCHAR(128)Username
6passwordVARCHAR(8)Password
7databaseVARCHAR(64)Database
8schemaVARCHAR(64)schema
9optionsVARCHAR(8191)Options
10create_timeTIMESTAMPCreation time

INS_FILESETS

Provides the time range, size, most recent compaction time, and compaction requirement of data filesets.

#Column NameData TypeDescription
1db_nameVARCHAR(64)Database name
2vgroup_idINTvgroup id
3fileset_idINTFileset ID
4start_timeTIMESTAMPStart of the data time range covered by the fileset
5end_timeTIMESTAMPEnd of the data time range covered by the fileset
6total_sizeBIGINTTotal fileset size
7last_compactTIMESTAMPTime of the last compaction
8should_compactBOOLWhether compaction is required: true for required, false for not required
9detailsVARCHAR(256)Detailed information

INS_FUNCTIONS

Provides the name, type, language, function body, and version of user-defined functions (UDFs). The same information can also be queried using SHOW FUNCTIONS.

#Column NameData TypeDescription
1nameVARCHAR(64)Function name
2commentVARCHAR(4095)Additional description. This column is a keyword and must be escaped with backticks in queries (for example, `comment`).
3aggregateINTWhether the function is an aggregate function. This column is a keyword and must be escaped with backticks in queries (for example, `aggregate`).
4output_typeVARCHAR(31)Output type
5create_timeTIMESTAMPCreation time
6code_lenINTCode length
7bufsizeINTBuffer size
8func_languageVARCHAR(31)UDF programming language
9func_bodyVARCHAR(65517)Function body definition
10func_versionINTFunction version. The initial version is 0 and increases by 1 each time the function is replaced.

INS_GRANTS

Provides an overview of Enterprise Edition licensing, including license status, time-series points, dnode and vnode quotas, and storage limits. The same information can also be queried using SHOW LICENCES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1versionVARCHAR(64)Enterprise Edition license version description
2expire_timeVARCHAR(19)Expiration time
3service_timeVARCHAR(19)Service time
4expiredVARCHAR(5)Whether expired
5stateVARCHAR(9)License status
6timeseriesVARCHAR(43)Licensed time-series point count
7dnodesVARCHAR(21)Licensed dnode count. This column is a keyword and must be escaped with backticks in queries (for example, `dnodes`)
8cpu_coresVARCHAR(21)Licensed CPU core count
9vnodesVARCHAR(21)Licensed vnode count. This column is a keyword and must be escaped with backticks in queries (for example, `vnodes`)
10storage_sizeVARCHAR(43)Licensed storage size

INS_GRANTS_FULL

Provides details for each Enterprise Edition license item, including display name, expiration time, and limits. The same information can also be queried using SHOW GRANTS FULL. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1grant_nameVARCHAR(32)License item name
2display_nameVARCHAR(256)Display name
3expireVARCHAR(32)Expiration time (seconds)
4limitsVARCHAR(512)limits

INS_GRANTS_LOGS

Provides logs related to license activation, revocation, and machine binding. The same information can also be queried using SHOW GRANTS LOGS. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1stateVARCHAR(1536)state
2activeVARCHAR(512)active
3machineVARCHAR(15600)machine
4active_infoVARCHAR(512)active_info
5revoke_infoVARCHAR(30)revoke_info

INS_INDEXES

Provides the names of created indexes, their databases and tables, column names, and index types. The same information can also be queried using SHOW INDEXES.

#Column NameData TypeDescription
1index_nameVARCHAR(192)Index name
2db_nameVARCHAR(64)Database containing the indexed table
3table_nameVARCHAR(192)Indexed table name
4vgroup_idINTvgroup ID
5create_timeTIMESTAMPCreation time
6column_nameVARCHAR(192)Indexed column name
7index_typeVARCHAR(192)Index type (such as SMA or tag)

INS_MACHINES

Provides the IDs, dnode counts, and versions of machines bound to licenses. The same information can also be queried using SHOW CLUSTER MACHINES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idVARCHAR(41)ID
2dnode_numINTdnode_num
3machineVARCHAR(7552)machine
4versionVARCHAR(32)version

INS_MNODES

Provides the ID, address, role, and status of each mnode (management node) in the cluster. The same information can also be queried using SHOW MNODES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idINTmnode id
2endpointVARCHAR(134)mnode address
3roleVARCHAR(12)Current role
4statusVARCHAR(9)Current status
5create_timeTIMESTAMPCreation time
6role_timeTIMESTAMPTime when the current role was assumed

INS_MOUNTS

Provides database mount names, their dnodes, paths, and creation times. The same information can also be queried using SHOW MOUNTS. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1nameVARCHAR(77)Name
2dnodeINTdnode
3create_timeTIMESTAMPCreation time
4pathVARCHAR(128)Path

INS_QNODES

Provides the ID, address, and creation time of each qnode (query node) in the cluster. The same information can also be queried using SHOW QNODES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idINTqnode id
2endpointVARCHAR(134)qnode address
3create_timeTIMESTAMPCreation time

INS_RETENTIONS

Provides the ID, target database, trigger mode, and type of data-retention tasks. The same information can also be queried using SHOW RETENTIONS.

#Column NameData TypeDescription
1retention_idINTRetention task ID
2db_nameVARCHAR(64)Database name
3start_timeTIMESTAMPStart time
4trigger_modeVARCHAR(10)trigger_mode
5typeVARCHAR(10)Type

INS_RETENTION_DETAILS

Provides retention-task details for each vgroup and dnode, including progress and remaining time. The same information can also be queried using SHOW RETENTION.

#Column NameData TypeDescription
1retention_idINTRetention task ID
2vgroup_idINTvgroup ID
3dnode_idINTdnode ID
4number_filesetINTnumber_fileset
5finishedINTfinished
6start_timeTIMESTAMPStart time
7progress(%)INTprogress(%)
8remain_time(s)BIGINTremain_time(s)

INS_ROLES

Provides role names, enablement status, types, and subroles. The same information can also be queried using SHOW ROLES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1nameVARCHAR(64)Name
2enableTINYINTWhether enabled
3create_timeTIMESTAMPCreation time
4update_timeTIMESTAMPUpdate time
5role_typeVARCHAR(7)role_type
6subrolesVARCHAR(2048)subroles

INS_ROLE_COLUMN_PRIVILEGES

Provides details of column-level privileges granted to roles. The same information can also be queried using SHOW ROLE COLUMN PRIVILEGES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1role_nameVARCHAR(24)role_name
2priv_typeVARCHAR(128)priv_type
3priv_scopeVARCHAR(32)priv_scope
4db_nameVARCHAR(65)Database name
5table_nameVARCHAR(193)Table name
6column_nameVARCHAR(65)column_name
7conditionVARCHAR(48)condition
8update_timeVARCHAR(40)Update time
9notesVARCHAR(64)notes

INS_ROLE_PRIVILEGES

Provides role privilege details, including privilege type, scope, database and table range, and conditions. The same information can also be queried using SHOW ROLE PRIVILEGES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1role_nameVARCHAR(24)role_name
2priv_typeVARCHAR(128)priv_type
3priv_scopeVARCHAR(32)priv_scope
4db_nameVARCHAR(65)Database name
5table_nameVARCHAR(193)Table name
6conditionVARCHAR(48)condition
7notesVARCHAR(64)notes
8columnsVARCHAR(12)columns
9update_timeVARCHAR(40)Update time

INS_RSMAS

Provides RSMA definition names, source tables, aggregation intervals, and function lists. The same information can also be queried using SHOW RSMAS.

#Column NameData TypeDescription
1rsma_nameVARCHAR(192)rsma_name
2rsma_idBIGINTrsma_id
3db_nameVARCHAR(64)Database name
4table_nameVARCHAR(192)Table name
5table_typeVARCHAR(21)table_type
6create_timeTIMESTAMPCreation time
7intervalVARCHAR(64)interval
8func_listVARCHAR(2048)func_list

INS_SCANS

Provides the ID, target database, and start time of data-scanning tasks. The same information can also be queried using SHOW SCANS.

#Column NameData TypeDescription
1scan_idINTScan task ID
2db_nameVARCHAR(64)Database name
3start_timeTIMESTAMPStart time

INS_SCAN_DETAILS

Provides scan-task details for each vgroup and dnode, including progress and remaining time. The same information can also be queried using SHOW SCAN.

#Column NameData TypeDescription
1scan_idINTScan task ID
2vgroup_idINTvgroup ID
3dnode_idINTdnode ID
4number_filesetINTnumber_fileset
5finishedINTfinished
6start_timeTIMESTAMPStart time
7progress(%)INTprogress(%)
8remain_time(s)BIGINTremain_time(s)

INS_SECURITY_POLICIES

Provides security-policy names, modes, operators, and most recent update times. The same information can also be queried using SHOW SECURITY_POLICIES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1nameVARCHAR(3)Name
2modeVARCHAR(30)Mode
3operatorVARCHAR(24)Operator
4last_updateTIMESTAMPMost recent update time
5descVARCHAR(128)Description

INS_SNAP_SEND_FILESETS

Provides read/write volume, progress, and transfer-type details by fileset during snapshot replication.

#Column NameData TypeDescription
1vgroup_idINTvgroup ID
2fidINTfid
3file_countINTfile_count
4finished_file_countINTfinished_file_count
5total_sizeBIGINTtotal_size
6read_sizeBIGINTread_size
7start_timeTIMESTAMPStart time
8elapsedVARCHAR(32)Elapsed time
9start_indexBIGINTstart_index
10end_indexBIGINTend_index
11transfer_typeVARCHAR(4)transfer_type

INS_SNAP_SEND_VNODES

Provides fileset transfer progress and elapsed time by vnode during snapshot replication.

#Column NameData TypeDescription
1vgroup_idINTvgroup ID
2dnode_idINTdnode ID
3total_file_setsINTtotal_file_sets
4finished_file_setsINTfinished_file_sets
5start_timeTIMESTAMPStart time
6elapsedVARCHAR(32)Elapsed time

INS_SNODES

Provides the ID, address, and replica relationships of each snode (stream-processing node) in the cluster. The same information can also be queried using SHOW SNODES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idINTsnode ID
2endpointVARCHAR(134)snode Address
3create_timeTIMESTAMPCreation time
4replicaIdINTReplica ID
5asReplicaOfVARCHAR(64)snode for which this node acts as a replica

INS_SSMIGRATES

Provides shared-storage migration progress, including migrated vgroups and filesets. The same information can also be queried using SHOW SSMIGRATES.

#Column NameData TypeDescription
1ssmigrate_idINTShared-storage migration task ID
2db_nameVARCHAR(64)Database name
3start_timeTIMESTAMPStart time
4number_vgroupINTnumber_vgroup
5migrated_vgroupINTmigrated_vgroup
6vgroup_idINTvgroup ID
7number_filesetINTnumber_fileset
8migrated_filesetINTmigrated_fileset
9fileset_idINTfileset_id

INS_STABLES

Provides supertable structure and properties, such as column and tag counts, comments, owner, and security level. The same information can also be queried using SHOW STABLES.

#Column NameData TypeDescription
1stable_nameVARCHAR(192)Supertable name
2db_nameVARCHAR(64)Name of the database containing the supertable
3create_timeTIMESTAMPCreation time
4columnsINTNumber of columns
5tagsINTNumber of tags. This column is a keyword and must be escaped with backticks in queries (for example, `tags`).
6last_updateTIMESTAMPLast update time
7table_commentVARCHAR(1024)Table comment
8watermarkVARCHAR(64)Window close time. This column is a keyword and must be escaped with backticks in queries (for example, `watermark`).
9max_delayVARCHAR(64)Maximum delay for pushing calculation results. This column is a keyword and must be escaped with backticks in queries (for example, `max_delay`).
10rollupVARCHAR(128)Rollup aggregate function. This column is a keyword and must be escaped with backticks in queries (for example, `rollup`).
11uidBIGINTSupertable UID
12isvirtualBOOLWhether this is a virtual supertable
13keepBIGINTData retention duration
14ownerVARCHAR(24)Owner
15sec_levelTINYINTSecurity level

INS_STREAMS

Provides stream-processing task names, databases, status, snode distribution, and error information. The same information can also be queried using SHOW STREAMS.

#Column NameData TypeDescription
1stream_nameVARCHAR(192)Stream name
2db_nameVARCHAR(64)Database containing the stream
3create_timeTIMESTAMPCreation time
4stream_idVARCHAR(19)Stream ID
5sqlVARCHAR(49152)SQL used to create the stream
6statusVARCHAR(20)Current status
7snodeLeaderINTLeader snode
8snodeReplicaINTReplica snode
9messageVARCHAR(256)Status or error information

INS_STREAM_RECALCULATES

Provides the time range, progress, and IDs of stream recalculation tasks.

#Column NameData TypeDescription
1stream_nameVARCHAR(192)Stream name
2stream_idVARCHAR(19)Stream ID
3recalc_idVARCHAR(19)Recalculation ID
4startTIMESTAMPstart
5endTIMESTAMPend
6progressVARCHAR(20)Progress

INS_STREAM_TASKS

Provides deployment locations, types, status, and most recent update times for internal stream-processing tasks.

#Column NameData TypeDescription
1stream_nameVARCHAR(192)Stream name
2stream_idVARCHAR(19)Stream ID
3task_idVARCHAR(19)Task ID
4typeVARCHAR(20)Type
5serious_idVARCHAR(19)serious_id
6deploy_idINTdeploy_id
7node_typeVARCHAR(10)node_type
8node_idINTnode_id
9task_idxINTtask_idx
10statusVARCHAR(20)Current status
11start_timeTIMESTAMPStart time
12last_updateTIMESTAMPMost recent update time
13extra_infoVARCHAR(64)extra_info
14messageVARCHAR(256)Information

INS_SUBSCRIPTIONS

Provides topic subscription relationships, including consumer groups, assigned vgroups, consumption progress, and consumed row counts. The same information can also be queried using SHOW SUBSCRIPTIONS.

#Column NameData TypeDescription
1topic_nameBINARY(205)Subscribed topic
2consumer_groupBINARY(193)Subscriber consumer group
3vgroup_idINTvgroup ID assigned to the consumer
4consumer_idBINARY(32)Unique consumer ID
5userBINARY(24)Username used by the consumer to log in
6fqdnBINARY(128)FQDN of the machine hosting the consumer
7offsetBINARY(64)Consumer progress
8rowsBIGINTNumber of rows consumed

INS_TABLES

Provides the structure and properties of regular tables and subtables, such as their supertable, vgroup, TTL, and table type. The same information can also be queried using SHOW TABLES.

#Column NameData TypeDescription
1table_nameVARCHAR(192)Table name
2db_nameVARCHAR(64)Database name
3create_timeTIMESTAMPCreation time
4columnsINTNumber of columns
5stable_nameVARCHAR(192)Name of the associated supertable
6uidBIGINTTable ID
7vgroup_idINTvgroup id
8ttlINTTable lifecycle. This column is a keyword and must be escaped with backticks in queries (for example, `ttl`).
9table_commentVARCHAR(1024)Table comment
10typeVARCHAR(21)Table type

INS_TABLE_FIXED_DISTRIBUTED

Provides statistics about table data-block distribution and compression for analyzing data skew and storage characteristics. The same information can also be queried using SHOW TABLE DISTRIBUTED.

#Column NameData TypeDescription
1db_nameVARCHAR(64)Database name
2table_nameVARCHAR(192)Table name
3vgroup_idINTvgroup ID
4total_blocksBIGINTtotal_blocks
5total_sizeBIGINTtotal_size
6average_sizeDOUBLEaverage_size
7compression_ratioDOUBLEcompression_ratio
8block_rowsBIGINTblock_rows
9min_rowsINTmin_rows
10max_rowsINTmax_rows
11avg_rowsDOUBLEavg_rows
12in_mem_rowsBIGINTin_mem_rows
13stt_rowsBIGINTstt_rows
14total_tablesBIGINTtotal_tables
15total_filesetsBIGINTtotal_filesets
16total_vgroupsBIGINTtotal_vgroups
17row_sizeINTrow_size
18block_dist_64BIGINTblock_dist_64
19block_dist_128BIGINTblock_dist_128
20block_dist_256BIGINTblock_dist_256
21block_dist_512BIGINTblock_dist_512
22block_dist_1024BIGINTblock_dist_1024
23block_dist_2048BIGINTblock_dist_2048
24block_dist_4096BIGINTblock_dist_4096
25block_dist_otherBIGINTblock_dist_other

INS_TAGS

Provides table tag names, types, and values for tag-based retrieval and metadata verification. The same information can also be queried using SHOW TAGS.

#Column NameData TypeDescription
1table_nameVARCHAR(192)Table name
2db_nameVARCHAR(64)Name of the database containing the table
3stable_nameVARCHAR(192)Name of the associated supertable
4tag_nameVARCHAR(64)Tag name
5tag_typeVARCHAR(32)Tag type
6tag_valueVARCHAR(16384)Tag value

INS_TOKENS

Provides user access-token names, users, providers, enablement status, and expiration times. The same information can also be queried using SHOW TOKENS.

#Column NameData TypeDescription
1nameVARCHAR(32)Name
2userVARCHAR(24)Username
3providerVARCHAR(64)Token provider
4enableTINYINTWhether enabled
5create_timeTIMESTAMPCreation time
6expire_timeTIMESTAMPExpiration time
7extra_infoVARCHAR(1024)Additional information

INS_TOPICS

Provides the names, databases, creation SQL, and schemas of created data-subscription topics. The same information can also be queried using SHOW TOPICS.

#Column NameData TypeDescription
1topic_nameBINARY(192)Topic name
2db_nameBINARY(64)Database associated with the topic
3create_timeTIMESTAMPTopic creation time
4sqlBINARY(2048)SQL statement used to create the topic
5schemaBINARY(65517)Topic schema

INS_TRANSACTIONS

Provides the stages, operation objects, failure counts, and latest execution information of currently executing metadata transactions. The same information can also be queried using SHOW TRANSACTIONS.

#Column NameData TypeDescription
1idBIGINTID
2create_timeTIMESTAMPCreation time
3stageVARCHAR(12)Current stage
4operVARCHAR(22)Operation
5dbVARCHAR(64)Associated database
6stableVARCHAR(192)Associated supertable
7killableVARCHAR(10)Whether terminable
8failed_timesINTFailure count
9last_exec_timeTIMESTAMPLast execution time
10last_action_infoVARCHAR(511)Details of the last execution failure
11typeVARCHAR(10)Type

INS_TRANSACTION_DETAILS

Provides the object type, target, result, and details of each action in a metadata transaction. The same information can also be queried using SHOW TRANSACTION.

#Column NameData TypeDescription
1transaction_idINTtransaction_id
2actionVARCHAR(30)action
3obj_typeVARCHAR(40)obj_type
4resultVARCHAR(100)result
5targetVARCHAR(300)target
6detailVARCHAR(100)detail

INS_TRANSACTION_LOGS

Provides the history of completed metadata transactions, including creator, status, type, and completion time. The same information can also be queried using SHOW TRANSACTION LOGS.

#Column NameData TypeDescription
1idBIGINTID
2create_userVARCHAR(24)Creating user
3create_timeTIMESTAMPCreation time
4complete_timeTIMESTAMPCompletion time
5statusVARCHAR(12)Current status
6commentVARCHAR(128)Comment
7typeVARCHAR(10)Type

INS_TRANSACTION_ORPHANS

Provides orphan-transaction detection results, including the associated vgroup, first and most recent detection times, and report count. The same information can also be queried using SHOW TRANSACTION ORPHANS.

#Column NameData TypeDescription
1idBIGINTID
2vgroup_idINTvgroup ID
3first_seenTIMESTAMPFirst detected time
4last_seenTIMESTAMPMost recently detected time
5report_countINTReport count

INS_TSMAS

Provides time-series SMA (TSMA) names, source and target tables, aggregation intervals, and creation SQL. The same information can also be queried using SHOW TSMAS.

#Column NameData TypeDescription
1tsma_nameVARCHAR(192)tsma_name
2db_nameVARCHAR(64)Database name
3table_nameVARCHAR(192)Table name
4target_dbVARCHAR(64)target_db
5target_stbVARCHAR(192)target_stb
6stream_nameVARCHAR(64)Stream name
7create_timeTIMESTAMPCreation time
8intervalVARCHAR(64)interval
9create_sqlVARCHAR(2048)create_sql
10func_listVARCHAR(2048)func_list

INS_USERS

Provides basic system-user attributes, such as whether the user is a superuser, enabled, or permitted to view system information. The same information can also be queried using SHOW USERS. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1nameVARCHAR(24)Username
2superTINYINTWhether the user is a superuser: 1 for yes, 0 for no
3enableTINYINTWhether the user is enabled: 1 for yes, 0 for no
4sysinfoTINYINTWhether the user can view system information: 1 for yes, 0 for no
5createdbTINYINTWhether the user can create databases
6create_timeTIMESTAMPCreation time
7totpTINYINTWhether TOTP is enabled
8allowed_hostVARCHAR(48)IP allowlist
9allowed_datetimeVARCHAR(48)Permitted login time window
10rolesVARCHAR(2048)Granted roles
11sec_levelsBINARY(5)Security-level range

INS_USERS_FULL

Provides complete user configuration, including password policies, session limits, host and time allowlists, and roles. The same information can also be queried using SHOW USERS FULL. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1nameVARCHAR(24)Name
2superTINYINTsuper
3enableTINYINTWhether enabled
4sysinfoTINYINTsysinfo
5createdbTINYINTcreatedb
6create_timeTIMESTAMPCreation time
7totpTINYINTtotp
8change_passTINYINTchange_pass
9encrypted_passVARCHAR(32)encrypted_pass
10session_per_userINTsession_per_user
11connect_timeINTconnect_time
12connect_idle_timeoutINTconnect_idle_timeout
13call_per_sessionINTcall_per_session
14vnode_per_callINTvnode_per_call
15failed_login_attemptsINTfailed_login_attempts
16password_life_timeINTpassword_life_time
17password_reuse_timeINTpassword_reuse_time
18password_reuse_maxINTpassword_reuse_max
19password_lock_timeINTpassword_lock_time
20password_grace_timeINTpassword_grace_time
21inactive_account_timeINTinactive_account_time
22allow_token_numINTallow_token_num
23allowed_hostVARCHAR(48)allowed_host
24allowed_datetimeVARCHAR(48)allowed_datetime
25rolesVARCHAR(2048)roles
26sec_levelsBINARY(5)sec_levels

INS_USER_PRIVILEGES

Provides user privilege details, including privilege type, scope, database and table range, and column privileges. The same information can also be queried using SHOW USER PRIVILEGES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1user_nameVARCHAR(24)Username
2priv_typeVARCHAR(128)Privilege type
3priv_scopeVARCHAR(32)Privilege scope
4db_nameVARCHAR(65)Database name
5table_nameVARCHAR(193)Table name
6conditionVARCHAR(48)Subtable privilege filter condition
7notesVARCHAR(64)Notes
8columnsVARCHAR(12)Column privilege information
9update_timeVARCHAR(40)Update time

INS_VGROUPS

Provides member distribution, replica status, cache information, and WAL-related positions for each vgroup. The same information can also be queried using SHOW VGROUPS.

#Column NameData TypeDescription
1vgroup_idINTvgroup id
2db_nameVARCHAR(64)Database name
3tablesINTNumber of tables in this vgroup. This column is a keyword and must be escaped with backticks in queries (for example, `tables`).
4v1_dnodeSMALLINTID of the dnode hosting the first member
5v1_statusVARCHAR(9)Status of the first member
6v1_applied/committedVARCHAR(100)Applied/committed position of the first member
7v2_dnodeSMALLINTID of the dnode hosting the second member
8v2_statusVARCHAR(9)Status of the second member
9v2_applied/committedVARCHAR(100)Applied/committed position of the second member
10v3_dnodeSMALLINTID of the dnode hosting the third member
11v3_statusVARCHAR(9)Status of the third member
12v3_applied/committedVARCHAR(100)Applied/committed position of the third member
13v4_dnodeSMALLINTID of the dnode hosting the fourth member
14v4_statusVARCHAR(9)Status of the fourth member
15v4_applied/committedVARCHAR(100)Applied/committed position of the fourth member
16is_readyBOOLWhether ready
17cacheloadBIGINTCache load
18cacheelementsINTNumber of cache elements
19tsmaTINYINTWhether this vgroup is dedicated to Time-range-wise SMA: 1 for yes, 0 for no
20mount_vgroup_idINTMounted vgroup ID
21keep_versionBIGINTWAL logs in this vgroup at or above keep_version are not automatically deleted
22keep_version_timeTIMESTAMPTime when keep_version was last modified for this vgroup
23compact_start_timeTIMESTAMPCompaction start time

INS_VIEWS

Provides view names, databases, definition SQL, parameters, and target tables. The same information can also be queried using SHOW VIEWS.

#Column NameData TypeDescription
1view_nameVARCHAR(192)View name
2db_nameVARCHAR(64)Database name
3effective_userVARCHAR(24)effective_user
4create_timeTIMESTAMPCreation time
5typeVARCHAR(128)Type
6query_sqlVARCHAR(2048)query_sql
7parametersVARCHAR(2048)parameters
8default_valuesVARCHAR(2048)default_values
9target_tableVARCHAR(192)target_table
10column_listVARCHAR(2048)column_list

INS_VIRTUAL_CHILD_COLUMNS

Provides references between virtual-subtable columns and source-table columns, including reference versions.

#Column NameData TypeDescription
1table_nameVARCHAR(192)Table name
2stable_nameVARCHAR(192)Supertable name
3db_nameVARCHAR(64)Database name
4col_nameVARCHAR(64)col_name
5uidBIGINTUID
6col_idINTcol_id
7col_sourceVARCHAR(258)col_source
8vgroup_idINTvgroup ID
9ref_versionINTref_version
10col_typeINTcol_type

INS_VIRTUAL_TABLES_REFERENCING

Provides references from virtual-table columns to source-table columns, including validation error codes and messages. The same information can also be queried using SHOW VTABLE VALIDATE. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1virtual_db_nameVARCHAR(64)virtual_db_name
2virtual_stable_nameVARCHAR(192)virtual_stable_name
3virtual_table_nameVARCHAR(192)virtual_table_name
4virtual_col_nameVARCHAR(64)virtual_col_name
5src_db_nameVARCHAR(64)src_db_name
6src_table_nameVARCHAR(192)src_table_name
7src_column_nameVARCHAR(64)src_column_name
8typeINTType
9err_codeBIGINTerr_code
10err_msgVARCHAR(512)err_msg

INS_VNODES

Provides each vnode's dnode, database, role status, and recovery progress. The same information can also be queried using SHOW VNODES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1dnode_idINTdnode ID
2vgroup_idINTvgroup ID
3db_nameBINARY(64)Database name
4statusVARCHAR(9)vnode status
5role_timeTIMESTAMPMost recent election time
6start_timeTIMESTAMPvnode start time
7restoredBOOLWhether restored
8apply_finish_timeVARCHAR(18)Recovery completion time
9unappliedINTNumber of unapplied requests
10buffer_segment_usedBIGINTBytes used in the buffer segment
11buffer_segment_sizeBIGINTTotal buffer-segment bytes

INS_VSTABLE_INHERITS

Provides inheritance relationships between virtual supertables, including parent and child supertable names and UIDs. The same information can also be queried using SHOW VTABLE INHERITS.

#Column NameData TypeDescription
1db_nameVARCHAR(64)Database name
2parent_stable_nameVARCHAR(192)Parent supertable name
3parent_uidBIGINTParent supertable UID
4child_stable_nameVARCHAR(192)Child supertable name
5child_uidBIGINTChild supertable UID
6create_timeTIMESTAMPCreation time

INS_XNODES

Provides the address, status, creation time, and update time of Xnode data-ingestion nodes. The same information can also be queried using SHOW XNODES. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idINTID
2urlVARCHAR(256)URL
3statusVARCHAR(16)Current status
4create_timeTIMESTAMPCreation time
5update_timeTIMESTAMPUpdate time

INS_XNODE_AGENTS

Provides Xnode Agent names, tokens, status, creation times, and update times. The same information can also be queried using SHOW XNODE AGENTS. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idINTID
2nameVARCHAR(64)Name
3tokenVARCHAR(512)Token
4statusVARCHAR(16)Current status
5create_timeTIMESTAMPCreation time
6update_timeTIMESTAMPUpdate time

INS_XNODE_JOBS

Provides the configuration, parent task, status, and failure reason of Xnode job shards. The same information can also be queried using SHOW XNODE JOBS. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idINTID
2task_idINTTask ID
3configVARCHAR(48)Configuration
4viaINTTransit node
5xnode_idINTXnode ID
6statusVARCHAR(16)Current status
7reasonVARCHAR(1024)Reason
8create_timeTIMESTAMPCreation time
9update_timeTIMESTAMPUpdate time

INS_XNODE_TASKS

Provides the source, target, status, labels, and creator of Xnode data-ingestion tasks. The same information can also be queried using SHOW XNODE TASKS. Users with SYSINFO set to 0 cannot view this table.

#Column NameData TypeDescription
1idINTID
2nameVARCHAR(64)Name
3fromVARCHAR(4096)Source
4toVARCHAR(2048)Target
5parserVARCHAR(48)Parser configuration
6viaINTTransit node
7xnode_idINTXnode ID
8statusVARCHAR(16)Current status
9reasonVARCHAR(1024)Reason
10created_byVARCHAR(24)Creator
11labelsVARCHAR(4096)Labels
12create_timeTIMESTAMPCreation time
13update_timeTIMESTAMPUpdate time