> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-table-statistics.md).

# SHOW TABLE\_STATISTICS

## Syntax

```bnf
SHOW TABLE_STATISTICS
```

## Description

{% tabs %}
{% tab title="Current" %}
The `SHOW TABLE_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. It was effectively replaced by the generic `SHOW TABLE STATISTICS` statement. The [information\_schema.TABLE\_STATISTICS](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-table_statistics-table.md) table shows statistics on table usage.
{% endtab %}

{% tab title="< 10.1.1" %}
The `SHOW TABLE_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.TABLE\_STATISTICS](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-table_statistics-table.md) table shows statistics on table usage.
{% 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.TABLE\_STATISTICS](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-table_statistics-table.md) articles for more information.

## Example

```sql
SHOW TABLE_STATISTICS\G
*************************** 1. row ***************************
           Table_schema: mysql
             Table_name: proxies_priv
              Rows_read: 2
           Rows_changed: 0
Rows_changed_x_#indexes: 0
*************************** 2. row ***************************
           Table_schema: test
             Table_name: employees_example
              Rows_read: 7
           Rows_changed: 0
Rows_changed_x_#indexes: 0
*************************** 3. row ***************************
           Table_schema: mysql
             Table_name: user
              Rows_read: 16
           Rows_changed: 0
Rows_changed_x_#indexes: 0
*************************** 4. row ***************************
           Table_schema: mysql
             Table_name: db
              Rows_read: 2
           Rows_changed: 0
Rows_changed_x_#indexes: 0
```

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

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