# SHOW CLIENT\_STATISTICS

## Syntax

```sql
SHOW CLIENT_STATISTICS
```

## Description

{% tabs %}
{% tab title="Current" %}
The `SHOW CLIENT_STATISTICS` statement has effectively been replaced by the generic [SHOW TABLE STATISTICS](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-table-statistics.md) statement. The [information\_schema.CLIENT\_STATISTICS](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-client_statistics-table.md) table holds statistics about client connections.
{% endtab %}

{% tab title="< 10.1.1" %}
The `SHOW CLIENT_STATISTICS` statement is part of the [User Statistics](/docs/server/ha-and-performance/optimization-and-tuning/query-optimizations/statistics-for-optimizing-queries/user-statistics.md) feature. The [information\_schema.CLIENT\_STATISTICS](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-client_statistics-table.md) table holds statistics about client connections.
{% endtab %}
{% endtabs %}

The [userstat](/docs/server/server-management/variables-and-modes/server-system-variables.md#userstat) system variable must be set to 1 to activate this feature. See the [User Statistics](/docs/server/ha-and-performance/optimization-and-tuning/query-optimizations/statistics-for-optimizing-queries/user-statistics.md) and [information\_schema.CLIENT\_STATISTICS](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-client_statistics-table.md) articles for more information.

## Example

```sql
SHOW CLIENT_STATISTICS\G
*************************** 1. row ***************************
                Client: localhost
     Total_connections: 35
Concurrent_connections: 0
        Connected_time: 708
             Busy_time: 2.5557979999999985
              Cpu_time: 0.04123740000000002
        Bytes_received: 3883
            Bytes_sent: 21595
  Binlog_bytes_written: 0
             Rows_read: 18
             Rows_sent: 115
          Rows_deleted: 0
         Rows_inserted: 0
          Rows_updated: 0
       Select_commands: 70
       Update_commands: 0
        Other_commands: 0
   Commit_transactions: 1
 Rollback_transactions: 0
    Denied_connections: 0
      Lost_connections: 0
         Access_denied: 0
         Empty_queries: 35
```

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-client-statistics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
