数据库
首页 > 数据库> > MySQL索引总结

MySQL索引总结

作者:互联网

set autocommit=1 通过general_log的日志查看

set max_execution_time 控制每个语句执行最长时间

information_schema.innodb_trx 设置长事务阈值,超过就报警
percona 的pt-kill工具不错

innodb_undo_tablespace设置为2 或者更大

innodb_io_capacity

脏页,刷脏页
flush
purge
merge

MySQL for update 和 lock in share mode

seconds_behind_master 主从延迟

主从延迟原因
1、主库DML 语句并发大,从库qps高
2、从空服务器配置差,后者一台服务器上多台从库
3、主库和从库配置不同
4、大事务
5、从库上进行备份操作
6、表上无主键
7、设置的是延迟备库
8、备库空间不足

标签:总结,主库,set,索引,innodb,MySQL,从库,延迟
来源: https://www.cnblogs.com/it-abel/p/16311686.html