# Automatically Update Statistics


![left](./student-guide/diagram/18-Automatic-update-01-01.png)

------------------------------------------------------------
Automatically update statistics
tidb_auto_analyze_ratio
0.5

Automatically update thresholds
tidb_auto_analyze_start_time
00:00 +0000

The start time of the day when automatic updates will be available
tidb_auto_analyze_end_time
23:59 +0000

The end time of the day when automatic updates are available

TiDB automatically updates the total number of rows in the table and the number of rows modified when the add, delete, and modify statements occur. This information is persisted periodically. The update period is 20* stats-lease, and the default value for stats-lease is 3s. If you specify 0, it will not be updated automatically.

When the ratio of modify rows to the total number of rows in a table is greater than tidb_auto_analyze_ratio and the current time is between tidb_auto_analyze_start_time and tidb_auto_analyze_end_time, TiDB executes ANALYZE in the background The TABLE tbl statement automatically updates the statistics for this table.

We can check the health of a table by using the SHOW HEALTHY STATS statement.
