# Statistics Health Indicators

+ **`SHOW STATS_META`**
  + Shows the updates status since last statistics collection
+ **`SHOW STATS_HEALTHY`**
  + Healthy =  (1 - modify_count / row_count) * 100 
  + By default, if Healthy is less than 50, statistics needs to be updated.

```
tidb> SHOW STATS_META WHERE table_name='T2'\G
*************************** 1. row ***************************
 Db_name: test
 Table_name: T2
Partition_name:
 ~!@Update_time: 2023-05-11 02:16:50@!~
 ~!@Modify_count: 20000@!~
 ~!@Row_count: 20000@!~
1 row in set (0.03 sec)
```

```
tidb> SHOW STATS_HEALTHY WHERE table_name='T2'\G
*************************** 1. row ***************************
    Db_name: test
  Table_name: T2
Partition_name:
    ~!@Healthy: 0@!~
1 row in set (0.00 sec)
```
------------------------------------------------------------------------------
Using the command `SHOW STATS_META WHERE table_name='T2'\G`, we can ascertain various details about the current table, such as the total number of rows (`Row_count`), the last statistics collection time (`Update_time`), and crucially, the extent of data changes since the last statistics collection (`Modify_count`).

We generally assess the obsolescence of statistics through a percentage metric `(1 - modify_count/row_count) * 100`, known as healthiness. This indicator can also be queried directly, as demonstrated in the second output.

The healthiness refers to the percentage of rows unmodified relative to the total number of rows allows us to evaluate whether statistics have become outdated. Monitoring this indicator helps determine the necessity for refreshing statistics. Specific healthiness thresholds vary across organizations. Some companies have a threshold of 90% for initiating statistics collection, while TiDB's default threshold is set at 50%. Most organizations consider statistics outdated when healthiness falls below 70%, prompting recollection. We will now discuss the process of collecting statistics.