Information Schema CLIENT_STATISTICS Table

You are viewing an old version of this article. View the current version here.

The Information Schema CLIENT_STATISTICS table holds statistics about client connections. This is part of the User Statistics feature, which is not enabled by default.

It contains the following columns:

FieldTypeNotes
CLIENTVARCHAR(64)The IP address or hostname the connection originated from.
TOTAL_CONNECTIONSBIGINT(21)The number of connections created for this client.
CONCURRENT_CONNECTIONSBIGINT(21)The number of concurrent connections for this client.
CONNECTED_TIMEBIGINT(21)The cumulative number of seconds elapsed while there were connections from this client.
BUSY_TIMEDOUBLEThe cumulative number of seconds there was activity on connections from this client.
CPU_TIMEDOUBLEThe cumulative CPU time elapsed while servicing this client's connections. Note that this number may be wrong on SMP system if there was a CPU migration for the thread during the execution of the query.
BYTES_RECEIVEDBIGINT(21)The number of bytes received from this client's connections.
BYTES_SENTBIGINT(21)The number of bytes sent to this client's connections.
BINLOG_BYTES_WRITTENBIGINT(21)The number of bytes written to the binary log from this client's connections.
ROWS_READBIGINT(21)The number of rows read by this client's connections.
ROWS_SENTBIGINT(21)The number of rows sent by this client's connections.
ROWS_DELETEDBIGINT(21)The number of rows deleted by this client's connections.
ROWS_INSERTEDBIGINT(21)The number of rows inserted by this client's connections.
ROWS_UPDATEDBIGINT(21)The number of rows updated by this client's connections.
KEY_READ_HITSBIGINT(21)From MariaDB 11.5
KEY_READ_MISSESBIGINT(21)From MariaDB 11.5
SELECT_COMMANDSBIGINT(21)The number of SELECT commands executed from this client's connections.
UPDATE_COMMANDSBIGINT(21)The number of UPDATE commands executed from this client's connections.
OTHER_COMMANDSBIGINT(21)The number of other commands executed from this client's connections.
COMMIT_TRANSACTIONSBIGINT(21)The number of COMMIT commands issued by this client's connections.
ROLLBACK_TRANSACTIONSBIGINT(21)The number of ROLLBACK commands issued by this client's connections.
DENIED_CONNECTIONSBIGINT(21)The number of connections denied to this client.
LOST_CONNECTIONSBIGINT(21)The number of this client's connections that were terminated uncleanly.
ACCESS_DENIEDBIGINT(21)The number of times this client's connections issued commands that were denied.
EMPTY_QUERIESBIGINT(21)The number of times this client's connections sent queries that returned no results to the server.
TOTAL_SSL_CONNECTIONSBIGINT(21)The number of TLS connections created for this client. (>= MariaDB 10.1.1)
MAX_STATEMENT_TIME_EXCEEDEDBIGINT(21)The number of times a statement was aborted, because it was executed longer than its MAX_STATEMENT_TIME threshold. (>= MariaDB 10.1.1)

Example

SELECT * FROM information_schema.CLIENT_STATISTICS\G
*************************** 1. row ***************************
                CLIENT: localhost
     TOTAL_CONNECTIONS: 3
CONCURRENT_CONNECTIONS: 0
        CONNECTED_TIME: 4883
             BUSY_TIME: 0.009722
              CPU_TIME: 0.0102131
        BYTES_RECEIVED: 841
            BYTES_SENT: 13897
  BINLOG_BYTES_WRITTEN: 0
             ROWS_READ: 0
             ROWS_SENT: 214
          ROWS_DELETED: 0
         ROWS_INSERTED: 207
          ROWS_UPDATED: 0
       SELECT_COMMANDS: 10
       UPDATE_COMMANDS: 0
        OTHER_COMMANDS: 13
   COMMIT_TRANSACTIONS: 0
 ROLLBACK_TRANSACTIONS: 0
    DENIED_CONNECTIONS: 0
      LOST_CONNECTIONS: 0
         ACCESS_DENIED: 0
         EMPTY_QUERIES: 1

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.