multi update caused deadlock problem
Update statement on your table introduces table scan. It means, that SQL Server reads every row in your table to check if row needs to be updated. During that read operation SQL Server issues (U) update lock on the row. In case if row needs to be updated, it converts (U) lock to (X) exclusive lock and held that lock till end of transaction. (U) locks are incompatible with other (U) nor (X) locks.
In your case you have 2 sessions waiting for each other. Each session puts X lock on (different) rows and tries to issue (U) lock and read the row updated by other session (with (X) lock held). It's a bit more complicated actually - you have more than 2 sessions involved but I hope you get an idea.
Create an index on iPHMD_InterestList_ID to avoid table scans during update
multi update caused deadlock problem的更多相关文章
- [转]两表join的multi update语句在MySQL中的执行流程分析
出自:http://hedengcheng.com/?p=209 两表join的multi update语句,执行结果与预计不一致的分析过程 — multi update结论在实际应用中,不要轻易使用 ...
- sql server deadlock problem
https://www.red-gate.com/simple-talk/sql/learn-sql-server/how-to-track-down-deadlocks-using-sql-serv ...
- 【转】表删除时 Cannot delete or update a parent row: a foreign key constraint fails 异常处理
转载地址:http://lijiejava.iteye.com/blog/790478 有两张表,结构如下: t_item: t_bid: id ...
- 表删除时 Cannot delete or update a parent row: a foreign key constraint fails 异常处理
有两张表,结构如下: t_item: t_bid: id int id int n ...
- Understanding the Uncertain Geographic Context Problem
"The areal units (zonal objects) used in many geographical studies are arbitrary, modifiable, a ...
- mongodb3.2系统性学习——3、update()操作
mongodb 包含众多的原子性操作: 实例: //连接数据库 dbService = connect("localhost:27017"); //选择插入集合 db = dbS ...
- java 并发官方教程
http://docs.oracle.com/javase/tutorial/essential/concurrency/index.html Concurrency Computer users t ...
- Known BREAKING CHANGES from NH3.3.3.GA to 4.0.0
Build 4.0.0.Alpha1 ============================= ** Known BREAKING CHANGES from NH3.3.3.GA to 4.0. ...
- DB2 Error Messages (Sorted by SQLCODE)
DB2 Error Messages (Sorted by SQLCODE) DB2 Error Messages (Sorted by SQLCODE) SQLCODE SQLSTATE Descr ...
随机推荐
- go语言获取字符串元素的个数
1:获取字符串字节的个数,并按字节挨个输出 package main import ( "fmt" ) func main() { var str string = "a ...
- centos7下挂载U盘和移动硬盘
挂载U盘 1.使用fdisk -l命令查看磁盘情况 [root@localhost ~]# fdisk -l 磁盘 /dev/sda:1000.2 GB, 1000204886016 字节,19535 ...
- HashMap的clear()方法和new HashMap的效率问题
最近研究Lucene的时候,遇到的用到大量Map的问题,心生好奇,想看一下在1W,10W,100W三种数据量下,new HashMap ,与 HashMap.clear()方法的效率问题. 提前说明: ...
- Android无线测试之—UiAutomator UiSelector API介绍之六
对象搜索—类名与包名 一.类名属性定位对象 返回值 API 描述 UiSelector calssName(String className) 完整类名匹配 UiSelector calssNameM ...
- Java 基础巩固:装箱拆箱 你真的熟悉吗
先考两道题: Integer a1 = 300; Integer a2 =300; System.out.print(a1 == a2); Integer b1 = 1; Integer b2 = 1 ...
- LeetCode Problem 169: Majority Element查找多数元素
描述:Given an array of size n, find the majority element. The majority element is the element that app ...
- iOS学习笔记(一)——ios搭建开发环境
好久就想试水IOS开发了,由于开发环境限制,一直局限于理论和虚拟机,近来入手了MacBook Pro,也来尝尝鲜,笔者也是现学现总结,如果有不足,请指正. IOS开发必备MAC OS X 另加一部iP ...
- Android———最详细的系统对话框(AlertDialog)详解
在实际应用开发中,用到系统对话框中的情况几乎是没有的.按开发流程来说,UI工程师都会给出每一个弹窗的样式,故而在实际开发中都是自定义弹窗的. 即使用到的地方不多,但是我们也是需要了解并且能熟练的运用它 ...
- 1084 矩阵取数问题 V2
1084 矩阵取数问题 V2 基准时间限制:2 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 一个M*N矩阵中有不同的正整数,经过这个格子,就能获得相应价值的奖励,先从左上走到右下 ...
- javaScript Number对象
Number 对象 Number 对象是原始数值的包装对象. 创建 Number 对象的语法: var myNum=new Number(value); var myNum=Number(value) ...