SHOW-COLUMN-STATS

Name

SinceVersion 2.0

SHOW COLUMN STATS

Description

Use SHOW COLUMN STATS to view various statistics data for columns.

Syntax:

1. SHOW COLUMN [cached] STATS table_name [ (column_name [, ...]) ];

Where:

  • cached: Show statistics information in the current FE memory cache.
  • table_name: The target table for collecting statistics. It can be in the format db_name.table_name.
  • column_name: Specifies the target column, which must be an existing column in table_name. You can specify multiple column names separated by commas.

Here’s an example:

1. mysql> show column stats lineitem(l_tax)\G;
2. *************************** 1. row ***************************
3. column_name: l_tax
4. count: 6001215.0
5. ndv: 9.0
6. num_null: 0.0
7. data_size: 4.800972E7
8. avg_size_byte: 8.0
9. min: 0.00
10. max: 0.08
11. method: FULL
12. type: FUNDAMENTALS
13. trigger: MANUAL
14. query_times: 0
15. updated_time: 2023-11-07 11:00:46

Keywords

SHOW, TABLE, STATS