# View Table Statistics (Continue...)
+ View information for histograms:
```7
mysql> SHOW STATS_BUCKETS WHERE db_name = 'tpcc' AND table_name = 'orders';
+---------+------------+----------------+-------------+----------+-----------+--------+---------+---------------------+---------------------+
| Db_name | Table_name | Partition_name | Column_name | Is_index | Bucket_id | Count  | Repeats | Lower_Bound         | Upper_Bound         |
+---------+------------+----------------+-------------+----------+-----------+--------+---------+---------------------+---------------------+
| tpcc    | orders     |                | PRIMARY     |        1 |         0 |   1024 |       1 | (1, 1, 1)           | (1, 1, 1024)        |
| tpcc    | orders     |                | PRIMARY     |        1 |         1 |   2048 |       1 | (1, 1, 1025)        | (1, 1, 2048)        |
| tpcc    | orders     |                | PRIMARY     |        1 |         2 |   3072 |       1 | (1, 1, 2049)        | (1, 2, 72)          |
... ...
| tpcc    | orders     |                | PRIMARY     |        1 |       151 | 155648 |       1 | (6, 2, 1625)        | (6, 2, 2648)        |
| tpcc    | orders     |                | PRIMARY     |        1 |       152 | 156000 |       1 | (6, 2, 2649)        | (6, 2, 3000)        |
| tpcc    | orders     |                | idx_order   |        1 |         0 |   1024 |       1 | (1, 1, 1, 1867)     | (1, 1, 1024, 2497)  |
| tpcc    | orders     |                | idx_order   |        1 |         1 |   2048 |       1 | (1, 1, 1025, 2440)  | (1, 1, 2048, 2438)  |
... ...
| tpcc    | orders     |                | idx_order   |        1 |       151 | 155648 |       1 | (6, 2, 1625, 3000)  | (6, 2, 2648, 1474)  |
| tpcc    | orders     |                | idx_order   |        1 |       152 | 156000 |       1 | (6, 2, 2649, 1437)  | (6, 2, 3000, 1521)  |
+---------+------------+----------------+-------------+----------+-----------+--------+---------+---------------------+---------------------+
306 rows in set (0.01 sec)
```
------------------------------------------------------------
View statistics for a table
View various statistics for a table
- View the metadata of the table SHOW STATS_META [showLikeOrWhere];
- Check the health status of the table SHOW STATS_HEALTHY [showLikeOrWhere];
- View the metadata of the column SHOW STATS_HISTORWHERE [showLikeOrWhere];
View the information of the histogram SHOW STATS_BUCKETS [showLikeOrWhere];
```
mysql> SHOW STATS_BUCKETS WHERE db_name = 'tpcc' AND table_name = 'orders';
+---------+------------+----------------+-------------+----------+-----------+--------+---------+---------------------+---------------------+
| Db_name | Table_name | Partition_name | Column_name | Is_index | Bucket_id | Count  | Repeats | Lower_Bound         | Upper_Bound         |
+---------+------------+----------------+-------------+----------+-----------+--------+---------+---------------------+---------------------+
| tpcc    | orders     |                | PRIMARY     |        1 |         0 |   1024 |       1 | (1, 1, 1)           | (1, 1, 1024)        |
| tpcc    | orders     |                | PRIMARY     |        1 |         1 |   2048 |       1 | (1, 1, 1025)        | (1, 1, 2048)        |
| tpcc    | orders     |                | PRIMARY     |        1 |         2 |   3072 |       1 | (1, 1, 2049)        | (1, 2, 72)          |
... ...
| tpcc    | orders     |                | PRIMARY     |        1 |       151 | 155648 |       1 | (6, 2, 1625)        | (6, 2, 2648)        |
| tpcc    | orders     |                | PRIMARY     |        1 |       152 | 156000 |       1 | (6, 2, 2649)        | (6, 2, 3000)        |
| tpcc    | orders     |                | idx_order   |        1 |         0 |   1024 |       1 | (1, 1, 1, 1867)     | (1, 1, 1024, 2497)  |
| tpcc    | orders     |                | idx_order   |        1 |         1 |   2048 |       1 | (1, 1, 1025, 2440)  | (1, 1, 2048, 2438)  |
... ...
| tpcc    | orders     |                | idx_order   |        1 |       151 | 155648 |       1 | (6, 2, 1625, 3000)  | (6, 2, 2648, 1474)  |
| tpcc    | orders     |                | idx_order   |        1 |       152 | 156000 |       1 | (6, 2, 2649, 1437)  | (6, 2, 3000, 1521)  |
+---------+------------+----------------+-------------+----------+-----------+--------+---------+---------------------+---------------------+
306 rows in set (0.01 sec)
```
- You can view information such as the total number of rows in the table and the number of rows modify by SHOW STATS_META.
- You can check the health of the statistics by SHOW STAT_HEALTHY and coarse filter whether the statistics on the estimate table are accurate. When the health level falls below the automatic update threshold tidb_auto_analyze_ratio mentioned earlier, the optimizer automatically collects statistics within the window period
- You can view information such as the number of different values and the number of nulls in a column by SHOW STATS_HISTORIES. The statement outputs information such as the number of distinct values and the number of nulls for all columns.
- You can view information for each bucket in the histogram via STAT_BUCKETS. From this example, we can see that there is not only the histogram information for the table, but also the histogram information for the index.
