tsql - SQL nolock and join -
I am using a process that consistently incorporates data into rows in two lines. At the same time I want to use some questions on these tables. As I said that it is done with the involvement (Rolalak) and I read the level of separation for questions and read nolok.
When I use inquiries on a table, they work completely, but when I try, joining 2 tables I get this error:
The transaction (process ID 88) was locked on lock resources with other resources and it has been selected as a deadlock victim. Run the transaction again. In the meantime, if I use the sp_lock process, I found that the key lock becomes a tab lock when I do my query Know that there is a special relationship between (nolok) and join it? And if there is, how can I avoid it? Update: (It is in an infinite loop and the data from #tbl_temp always changes. Actually this is a more complex process, but it is an idea.) from * # tbl_temp2 with Insert (row3) with tbl2 (colLay) (col3, col4, col5) - deadlock You may (But keep in mind that this is the increased pressure on tempDB Will put) (rolllock) (col1, col2, col3) * select from #tbl_temp
Select
Set transaction segregation level unsecured selection col1 , Col2, col3 to tbl1 (nolock) - works properly col1, col2, a.col3 to tbl1 (noloc K) with tbl2 (nolock) (tbl1.col3) = Tbl2.col3)
Comments
Post a Comment