中易网

the total number of locks exceeds the lock table size怎么解决

答案:2  悬赏:80  
解决时间 2021-02-15 16:25
the total number of locks exceeds the lock table size怎么解决
最佳答案
在操作mysql数据库表时出现the total number of locks exceeds the lock table size错误。

If you're running an operation on a large number of rows within a table that uses the InnoDB storage engine, you might see this error:
ERROR 1206 (HY000): The total number of locks exceeds the lock table size
MySQL is trying to tell you that it doesn't have enough room to store all of the row locks that it would need to execute your query. The only way to fix it for sure is to adjust innodb_buffer_pool_size and restart MySQL. By default, this is set to only 8MB, which is too small for anyone who is using InnoDB to do anything.
If you need a temporary workaround, reduce the amount of rows you're manipulating in one query. For example, if you need to delete a million rows from a table, try to delete the records in chunks of 50,000 or 100,000 rows. If you're inserting many rows, try to insert portions of the data at a single time.


原来是InnoDB表执行大批量数据的更新,插入,删除操作时会出现这个问题,需要调整InnoDB全局的innodb_buffer_pool_size的值来解决这个问题,并且重启mysql服务。
查看当前数据库存储引擎,在创建时使用 ENGINE=InnoDB类型。
默认的innodb_buffer_pool_size=8M
如下图所示

修改 innodb_buffer_pool_size的值:
innodb_buffer_pool_size=64M


再一次重启mysql服务器,执行表操作,成功执行完毕。即可。
全部回答
the total number of locks exceeds the lock table size
锁的总数超过了锁表的大小
the total number of locks exceeds the lock table size
锁的总数超过了锁表的大小
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
有谁有工口游戏资源吗,
打雷下雨属于什么变化?
蜜丝坊手工甜品课堂地址有知道的么?有点事想
男孩子带蓝色美瞳会夸张吗?
我很脏,做为男人,应该怎样洗去我身体的耻辱
风扇连续吹二十四小时要多少电?
快乐男声小强 姐姐
手擀面饺子馆地址在什么地方,想过去办事
电子邮件用qq怎么注册
火车提速后西安到长春的火车几点开
求推荐剧情好的BL drama~
这两套衣服那一件好看?说说你的理由
梦见老婆穿透露裙子
2,6-二羟基苯甲醛 全国最大厂家是哪家啊?
福汇特惠屋这个地址在什么地方,我要处理点事
推荐资讯
盐城市顺丰快递员电话
税务会计考试题,第一题是资源税,第二题是递
诺基亚手机扩展卡无法正常使用
古惑仔小说版本
苏梅岛有什么好吃的
交了20年的养老保险,交的是江苏省苏北最低档
同鑫五金工具商店我想知道这个在什么地方
暴躁.迅即.激烈.害羞的近义词
超记桌球室地址有知道的么?有点事想过去
京广物流和京广快递
玄武空间设计机构在什么地方啊,我要过去处理
There are countless people who, ever since
手机登qq时,显示手机磁盘不足,清理后重新登
刺客的套装怎么选啊?