Skip to main content

Performance Data

Starting from v3.0.0.0, TDengine provides the built-in database PERFORMANCE_SCHEMA for performance-related statistics. The sections below describe each table and its columns (aligned with the current system-table definitions).

Richer metadata and status information is also available via INFORMATION_SCHEMA (see Metadata) and the corresponding SHOW Commands.

PERF_APPS

Provides write/query statistics, slow-query counts, and last-access time for applications (clients) connected to the cluster. You can also query with SHOW APPS.

#ColumnData TypeDescription
1app_idUBIGINTClient ID
2ipVARCHAR(16)Client address
3pidINTClient process ID
4nameVARCHAR(24)Client name
5start_timeTIMESTAMPClient start time
6insert_reqUBIGINTNumber of INSERT requests
7insert_rowUBIGINTNumber of rows inserted
8insert_timeUBIGINTINSERT request processing time, in microseconds
9insert_bytesUBIGINTINSERT request message size in bytes
10fetch_bytesUBIGINTQuery result size in bytes
11query_timeUBIGINTQuery request processing time
12slow_queryUBIGINTNumber of slow queries (processing time ≥ 3 seconds)
13total_reqUBIGINTTotal number of requests
14current_reqUBIGINTNumber of requests currently being processed
15last_accessTIMESTAMPLast update time

PERF_CONNECTIONS

Provides user, client, login time, connection type, and token information for current database connections. You can also query with SHOW CONNECTIONS.

#ColumnData TypeDescription
1conn_idUINTConnection ID
2userBINARY(24)Username. Keyword column; escape with backticks when querying (e.g. `user`)
3appBINARY(24)Client name
4pidUINTClient process ID that initiated the connection
5end_pointBINARY(134)Client address
6login_timeTIMESTAMPLogin time
7last_accessTIMESTAMPLast update time
8user_appBINARY(24)User-side application name
9user_ipVARCHAR(22)User-side IP
10native_versionBINARY(32)Native client version
11connector_infoBINARY(256)Connector information
12typeBINARY(16)Connection type
13tokenBINARY(32)Token name (if logged in with a token)

PERF_CONSUMERS

Provides consumer group, status, subscribed topics, parameters, and last poll time for data-subscription consumers. You can also query with SHOW CONSUMERS.

#ColumnData TypeDescription
1consumer_idBINARY(32)Unique consumer ID
2consumer_groupBINARY(193)Consumer group
3client_idBINARY(256)Client identifier specified when creating the consumer
4userBINARY(24)Username
5fqdnBINARY(128)FQDN of the machine running the consumer
6statusBINARY(20)Current status: ready (available), lost (connection lost), rebalancing (vgroup assignment in progress), unknown
7topicsBINARY(205)Subscribed topics; multiple topics are shown as multiple rows
8end_pointVARCHAR(22)Endpoint
9up_timeTIMESTAMPTime of first connection to taosd
10subscribe_timeTIMESTAMPTime of the most recent subscribe request
11rebalance_timeTIMESTAMPTime of the most recent rebalance
12parametersBINARY(192)Subscription parameters
13poll_timeTIMESTAMPTime of the most recent poll

PERF_INSTANCES

Provides registration information for instances connected to the cluster, including type, description, and registration/expiration times. You can also query with SHOW INSTANCES.

#ColumnData TypeDescription
1idVARCHAR(257)ID
2typeVARCHAR(66)Type
3descVARCHAR(514)Instance description
4first_reg_timeTIMESTAMPFirst registration time
5last_reg_timeTIMESTAMPMost recent registration time
6expireINTExpiration time (seconds)

PERF_QUERIES

Provides identifiers, elapsed time, phase status, and SQL text for queries currently running. You can also query with SHOW QUERIES.

#ColumnData TypeDescription
1kill_idVARCHAR(26)ID used with KILL QUERY
2query_idUBIGINTQuery ID
3conn_idUINTConnection ID
4appVARCHAR(24)Application name
5pidINTProcess ID of the application on its host
6userVARCHAR(24)Username
7end_pointVARCHAR(22)Client address
8create_timeTIMESTAMPCreation time
9exec_usecBIGINTElapsed execution time (microseconds)
10stable_queryBOOLWhether this is a supertable query
11sub_queryBOOLWhether this is a subquery
12sub_numINTNumber of subqueries
13sub_statusVARCHAR(1000)Subquery status (including subquery ID, status, and status start time)
14sqlVARCHAR(2048)SQL statement. Keyword column; escape with backticks when querying
15user_appVARCHAR(24)User-side application name
16user_ipVARCHAR(22)User-side IP
17phase_stateVARCHAR(64)Current query phase / status
18phase_start_timeTIMESTAMPStart time of the current phase

PERF_TRANS

Provides stage, operation target, failure count, and recent execution details for metadata transactions currently running. You can also query with SHOW TRANSACTIONS.

#ColumnData TypeDescription
1idBIGINTTransaction ID
2create_timeTIMESTAMPCreation time
3stageVARCHAR(12)Current stage (e.g. redoAction, undoAction, commit)
4operVARCHAR(22)Operator
5dbVARCHAR(64)Related database
6stableVARCHAR(192)Related supertable
7killableVARCHAR(10)Whether the transaction can be killed
8failed_timesINTTotal number of execution failures
9last_exec_timeTIMESTAMPLast execution time
10last_action_infoVARCHAR(511)Details of the last failed execution
11typeVARCHAR(10)Transaction type