Sep 24, 2022

Index in MySQL

Index Info...

SELECT DISTINCT     TABLE_NAME, INDEX_NAME,COLUMN_NAME, index_type FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA ='thinklouder_optimization';

SHOW INDEXES FROM table_name IN database_name;

------------------------------------------------------

OPTIMIZE TABLE tbl; 

will rebuild the indexes and do ANALYZE; it takes time.

------------------------------------------------------

ANALYZE TABLE tbl; 

is fast for InnoDB to rebuild the stats. With 5.6.6 it is even less needed.

------------------------------------------------------

Read the article 

https://www.thegeekstuff.com/2016/04/mysql-optimize-table/


No comments:

Post a Comment

If you have any doubt or question, please contact us.