UPDATE语句处于“查询结束状态". [英] UPDATE statements are in "query end state"
问题描述
我们最近升级了在mysql服务器版本5.5.8上运行的mysql数据库.升级后,有时我们会看到简单的升级过程需要10秒钟以上.当我查看进程列表时,它表明它们全部处于查询结束"状态.有没有人对此有任何想法.
We recently upgraded mysql database which is running on mysql server version 5.5.8. After the upgrade sometimes we are seeing the simple upgrade staements taking more than 10 seconds. And when i looked at the processlist it shows that all of them are in "query end" state. Does any body has any idea on this.
UPDATE Accounts SET IPadd = 'xx.xx.xx.xx', updatedtime = NULL WHERE Id=xx;
推荐答案
建议:
1)检查日志文件的大小
1) Check the size of your log files
2)确保"id"具有索引
2) Make sure "id" has an index
3)查看各种MySql调整和配置选项.例如:innodb_flush_log_at_trx_commit = 0
3) Look at various MySql tuning and configuration options. For example: innodb_flush_log_at_trx_commit = 0
LINK:查询结束"在随机时间步长很长
警告:禁用日志刷新之前,请仔细考虑.在此处查看更多详细信息:
WARNING: consider carefully before disabling log flushing. Look here for more details:
LINK: https ://dba.stackexchange.com/questions/12611/is-it-safe-to-use-innodb-flush-log-at-trx-commit-2
这篇关于UPDATE语句处于“查询结束状态".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!