Mysql checks the index usage. This is a read-based online database. Java code root @ read 02:28:07> show status like 'handler _ read % '; + -------- + --- + | Variable_name | Value | + -------- + --- + | Handler_read_first | 0 | Handler_read_key | 0 | Handler_read_next | 0 | Handler_read_prev | 0 | bytes | 0 | | Handler_read_rnd_next | 61 | + -------- + --- + 6 rows in set (0.41 sec) handler_read_first indicates the number of times the index header is read. If the value is very high, it indicates that there are many full index scans. Handler_read_key indicates the number of times an index is used. If we add a new index, we can check whether Handler_read_key has been increased. If so, SQL uses indexes. Handler_read_next indicates that the following indexes are read. Generally, range scan occurs. Handler_read_prev indicates the upper column of the index to be read, which usually occurs in order... DESC. Handler_read_rnd indicates reading rows at a fixed position. If the value is very high, it indicates that a large number of result sets are sorted, full table scanning is performed, and no proper KEY is used for associated queries. Handler_read_rnd_next indicates that many table scans are performed and query performance is low.