UPDATE LOW_PRIORITY 是否返回正确的受影响行数?
我需要进行大量UPDATE
,并且不需要经常阅读表格。
所以我想到使用 UPDATE LOW_PRIORITY
但它返回正确数量的 affected_rows()
吗?
或者考虑到它不是立即提交,它无法知道有多少记录会受到影响?
mysql_query("UPDATE LOW_PRIORITY table SET view = view + 1 WHERE id = 123");
echo mysql_affected_rows();
I need to make a lot of UPDATE
and I don't need to read the table often.
So I thought of using UPDATE LOW_PRIORITY
but does it return the correct number of affected_rows()
?
Or considering it's not instantly committed it can't know how many records will be affected?
mysql_query("UPDATE LOW_PRIORITY table SET view = view + 1 WHERE id = 123");
echo mysql_affected_rows();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,它返回受影响的行数,LOW_PRIORITY 不会影响这部分。
Yes it returns the affected rows number, LOW_PRIORITY doesn't affect this part.