Skip to main content

Performance_Schema Database

TDengine includes a built-in database named PERFORMANCE_SCHEMA to provide access to database performance statistics. This document introduces the tables of PERFORMANCE_SCHEMA and their structure.

PERF_APP

Provides information about clients (such as applications) that connect to the cluster. Similar to SHOW APPS.

#ColumnData TypeDescription
1app_idUBIGINTClient ID
2ipBINARY(16)Client IP address
3pidINTClient process
4nameBINARY(24)Client name
5start_timeTIMESTAMPTime when client was started
6insert_reqUBIGINTInsert requests
7insert_rowUBIGINTRows inserted
8insert_timeUBIGINTTime spent processing insert requests in microseconds
9insert_bytesUBIGINTSize of data inserted in byted
10fetch_bytesUBIGINTSize of query results in bytes
11query_timeUBIGINTTime spend processing query requests
12slow_queryUBIGINTNumber of slow queries (greater than or equal to 3 seconds)
13total_reqUBIGINTTotal requests
14current_reqUBIGINTRequests currently being processed
15last_accessTIMESTAMPLast update time

PERF_CONNECTIONS

Provides information about connections to the database. Similar to SHOW CONNECTIONS.

#ColumnData TypeDescription
1conn_idINTConnection ID
2userBINARY(24)User name
3appBINARY(24)Client name
4pidUINTClient process ID on client device that initiated the connection
5end_pointBINARY(128)Client endpoint
6login_timeTIMESTAMPLogin time
7last_accessTIMESTAMPLast update time

PERF_QUERIES

Provides information about SQL queries currently running. Similar to SHOW QUERIES.

#ColumnData TypeDescription
1kill_idUBIGINTID used to stop the query
2query_idINTQuery ID
3conn_idUINTConnection ID
4appBINARY(24)Client name
5pidINTClient process ID on client device
6userBINARY(24)User name
7end_pointBINARY(16)Client endpoint
8create_timeTIMESTAMPCreation time
9exec_usecBIGINTElapsed time
10stable_queryBOOLWhether the query is on a supertable
11sub_numINTNumber of subqueries
12sub_statusBINARY(1000)Subquery status
13sqlBINARY(1024)SQL statement

PERF_CONSUMERS

#ColumnData TypeDescription
1consumer_idBIGINTConsumer ID
2consumer_groupBINARY(192)Consumer group
3client_idBINARY(192)Client ID (user-defined)
4statusBINARY(20)Consumer status
5topicsBINARY(204)Subscribed topic. Returns one row for each topic.
6up_timeTIMESTAMPTime of first connection to TDengine Server
7subscribe_timeTIMESTAMPTime of first subscription
8rebalance_timeTIMESTAMPTime of first rebalance triggering

PERF_TRANS

#ColumnData TypeDescription
1idINTID of the transaction currently running
2create_timeTIMESTAMPCreation time
3stageBINARY(12)Transaction stage (redoAction, undoAction, or commit)
4db1BINARY(64)First database having a conflict with the transaction
5db2BINARY(64)Second database having a conflict with the transaction
6failed_timesINTTimes the transaction has failed
7last_exec_timeTIMESTAMPPrevious time the transaction was run
8last_action_infoBINARY(511)Reason for failure on previous run

PERF_SMAS

#ColumnData TypeDescription
1sma_nameBINARY(192)Time-range-wise SMA name
2create_timeTIMESTAMPCreation time
3stable_nameBINARY(192)Supertable name
4vgroup_idINTDedicated vgroup name