[英]How to index rebuild in MySQL for all tables in a database?
5 and i have to do index rebuild for all tables in a database which is in InnoDB. 5 并且我必须对 InnoDB 中的数据库中的所有表进行索引重建。 i know Optimize which did at table level.
我知道优化是在表级别完成的。 Is there any way to do this for all tables in a database in one go.
有没有办法一次性对数据库中的所有表执行此操作。
你可以试试这个:
mysqlcheck -u root -p --auto-repair --check --optimize --all-databases
只需使用 sudo /opt/lampp/bin/mysqlcheck -u root -p --optimize --all-databases,当要求输入密码时只需按 Enter
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.