摘要: 1、show global variables like 'wait_timeout' 2、show VARIABLES like "%slow%" 3、set global long_query_time = 0.01 4、set global slow_query_log = ON 5、tmp_ 阅读全文
posted @ 2016-09-08 18:53 loweringye 阅读(100) 评论(0) 推荐(0) 编辑
摘要: optimize table在优化MySQL时很重要。所以对于写比较频烦的表,要定期进行optimize,如一个月一次。 注意,在OPTIMIZE TABLE运行过程中,MySQL会锁定表。 阅读全文
posted @ 2016-09-08 18:45 loweringye 阅读(152) 评论(0) 推荐(0) 编辑