报错:Could not position within a table,求大虾出手
在对某张表进行大数据量的插入和查询动作的时候,经常会出现Could not position within a table的错误。不知道有没有哪位大虾能帮忙分析一下为什么会导致这种错误?
出现报错时,有两个错误号。请具体写出。。。
-144 ISAM error: key value locked.
除了设置等待锁时间之外,还有其他解决办法吗?
关于这段解释
The current operation inserts a row with a certain primary key value or
updates a row with a certain primary key value, but a transaction that
has not yet been committed has deleted that key value from the index.
This error occurs only when the lock mode is set to NOT WAIT. Treat it
the same as error -107 (record is locked). Roll back the current
transaction, and re-execute it after a delay. Then, if the other
transaction was committed, the lock no longer exists. If it was rolled
back, the key exists, and this operation receives a duplicate-key
error.
英语不是很好,看的有点迷糊:
谁能帮我解释一下这段话吗?
The current operation inserts a row with a certain primary key value or
updates a row with a certain primary key value, but a transaction that
has not yet been committed has deleted that key value from the index. 笨鸟先飞,笨猪先肥。
嘎嘎
走别人的路,让别人无路可走
感謝樓主
回复 3# Oo烟花火
若是需要的数据不是非常精确,可以使用dirty read。insert的话没什么好办法,使用行锁也许会好些。。 已经是行锁了0 0 对单表大量数据插入(猜测是不是在做数据维护),可以考虑先取消数据库事务支持,等插入操作完成后再恢复事务,一点愚见 设置成最后提交读不知道可以吗?
set isolation to commited read last commited
页:
[1]
2