SQL Server 2008 Running trigger after Insert, Update locks original table

后端 未结 1 1469
说谎
说谎 2020-12-11 14:14

I have a serious performance problem.

I have a database with (related to this problem), 2 tables.

1 Table contains strings with some global information. The

相关标签:
1条回答
  • 2020-12-11 14:24

    I looked around on the internet, and I couldn't find any way of making the trigger happen without claiming a lock. Therefore I choose to do the inserts via a stored procedure, which in turn performs the logic previously found in the trigger. This allowed me to execute the content of the trigger in a transaction AFTER the actual data was inserted and the insertion lock was lifted.

    Hope this helps!

    0 讨论(0)
提交回复
热议问题