84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
现在用的程序是php+mysql,linux服务器,有没有什么办法可以每天在固定时间进行一次mysql表的优化,
需要自动优化的原有主要是因为搜索的用户太多了,造成搜索缓存太多,占用空间
How to automatically optimize the mysql specified table every day-PHP Chinese website Q&A-How to automatically optimize the mysql specified table every day-PHP Chinese website Q&A
Just watch and learn.
要想定时的花,mysql有自带的定时事件EVENT;例子:每天凌晨0点定时执行存储过程p_optimize_table
CREATE EVENT `optimize_table_event` ON SCHEDULE EVERY 1 DAY STARTS '2017-03-06 00:00:00' ON COMPLETION NOT PRESERVE ENABLE COMMENT '自动优化表' DO CALL p_optimize_table()
这只是一个定时事件,通过调用存储过程p_optimize_table,你要做的优化表工作就在这个存储过程里做。话说,因为搜索太多,缓存太多,所以优化表?OPTIMIZE TABLE?好奇你要怎么优化。
How to automatically optimize the mysql specified table every day-PHP Chinese website Q&A-How to automatically optimize the mysql specified table every day-PHP Chinese website Q&A
Just watch and learn.
要想定时的花,mysql有自带的定时事件EVENT;例子:每天凌晨0点定时执行存储过程p_optimize_table
这只是一个定时事件,通过调用存储过程p_optimize_table,你要做的优化表工作就在这个存储过程里做。
话说,
因为搜索太多,缓存太多,所以优化表?OPTIMIZE TABLE?
好奇你要怎么优化。