Skip to main content
Skip to main content

SHOW-TABLE-STATS

SHOW-TABLE-STATS​

Name​

SinceVersion 2.0

SHOW TABLE STATS

Description​

Use SHOW TABLE STATS to view an overview of statistics collection for a table.

Syntax:

SHOW TABLE STATS table_name;

Where:

  • table_name: The target table name. It can be in the format db_name.table_name.

Output:

Column NameDescription
updated_rowsUpdated rows since the last ANALYZE
query_timesReserved column for recording the number of times the table was queried in future versions
row_countNumber of rows (does not reflect the exact number of rows at the time of command execution)
updated_timeLast update time
columnsColumns for which statistics information has been collected

Here's an example:

mysql> show table stats lineitem \G;
*************************** 1. row ***************************
updated_rows: 0
query_times: 0
row_count: 6001215
updated_time: 2023-11-07
columns: [l_returnflag, l_receiptdate, l_tax, l_shipmode, l_suppkey, l_shipdate, l_commitdate, l_partkey, l_orderkey, l_quantity, l_linestatus, l_comment, l_extendedprice, l_linenumber, l_discount, l_shipinstruct]
trigger: MANUAL

Keywords​

SHOW, TABLE, STATS