简体   繁体   中英

What is the use of ANALYZE TABLE key word in mysql?

Can it used to repair mysql index. I am facing performance issues even for queries that use index

Depends on your version of MySQL and storage engine but in general:

OPTIMIZE TABLE Analyzes table, stores the key distribution for a table, reclaims the unused space and defragments the data file.

ANALYZE TABLE Only analyzes table and stores the key distribution.

https://dev.mysql.com/doc/refman/5.6/en/analyze-table.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM