Skip to main content

Performance Data

Starting from TDengine version 3.0, a built-in database called performance_schema has been provided, which stores performance-related statistical data. This section details the tables and structures within it.

PERF_APP

Provides information about applications (clients) that connect to the cluster. You can also use SHOW APPS to query this information.

#Column NameData TypeDescription
1app_idUBIGINTClient ID
2ipBINARY(16)Client address
3pidINTClient process ID
4nameBINARY(24)Client name
5start_timeTIMESTAMPClient startup time
6insert_reqUBIGINTNumber of insert requests
7insert_rowUBIGINTNumber of rows inserted
8insert_timeUBIGINTProcessing time of insert requests, in microseconds
9insert_bytesUBIGINTNumber of bytes in insert request message
10fetch_bytesUBIGINTNumber of bytes in query results
11query_timeUBIGINTProcessing time for query requests
12slow_queryUBIGINTNumber of slow queries (processing time >= 3 seconds)
13total_reqUBIGINTTotal number of requests
14current_reqUBIGINTNumber of currently processed requests
15last_accessTIMESTAMPLast update time

PERF_CONNECTIONS

Provides information about database connections. You can also use SHOW CONNECTIONS to query this information.

#Column NameData TypeDescription
1conn_idINTConnection ID
2userBINARY(24)Username
3appBINARY(24)Client name
4pidUINTProcess ID of the client that initiated this connection
5end_pointBINARY(128)Client address
6login_timeTIMESTAMPLogin time
7last_accessTIMESTAMPLast update time

PERF_QUERIES

Provides information about currently executing SQL statements. You can also use SHOW QUERIES to query this information.

#Column NameData TypeDescription
1kill_idUBIGINTID used to stop the query
2query_idINTQuery ID
3conn_idUINTConnection ID
4appBINARY(24)App name
5pidINTApp process ID on the host
6userBINARY(24)Username
7end_pointBINARY(16)Client address
8create_timeTIMESTAMPCreation time
9exec_usecBIGINTExecution time
10stable_queryBOOLIndicates if it is a supertable query
11sub_numINTNumber of subqueries
12sub_statusBINARY(1000)Subquery status
13sqlBINARY(1024)SQL statement

PERF_CONSUMERS

#Column NameData TypeDescription
1consumer_idBIGINTUnique ID of the consumer
2consumer_groupBINARY(192)Consumer group
3client_idBINARY(192)User-defined string, displayed by specifying client_id when creating the consumer
4statusBINARY(20)Current status of the consumer. Status includes: ready (available), lost (connection lost), rebalancing (vgroup allocation in progress), unknown (unknown state)
5topicsBINARY(204)Subscribed topics. If multiple topics are subscribed, they are displayed in multiple rows
6up_timeTIMESTAMPTime of first connection to taosd
7subscribe_timeTIMESTAMPTime of last subscription initiation
8rebalance_timeTIMESTAMPTime of last rebalance trigger

PERF_TRANS

#Column NameData TypeDescription
1idINTID of the ongoing transaction
2create_timeTIMESTAMPCreation time of the transaction
3stageBINARY(12)Current stage of the transaction, usually redoAction, undoAction, commit
4db1BINARY(64)Name of database 1 that conflicts with this transaction
5db2BINARY(64)Name of database 2 that conflicts with this transaction
6failed_timesINTTotal number of times the transaction execution failed
7last_exec_timeTIMESTAMPLast execution time of the transaction
8last_action_infoBINARY(511)Details of the last execution failure of the transaction

PERF_SMAS

#Column NameData TypeDescription
1sma_nameBINARY(192)Name of the time-range-wise SMA
2create_timeTIMESTAMPCreation time of the SMA
3stable_nameBINARY(192)Name of the supertable to which the SMA belongs
4vgroup_idINTName of the exclusive vgroup for the SMA