Reputation: 11
I have two tables TableA and TabelB in SQL Server, there is a foreign key relationship between them, and TableA defined a rowversion
column to synchronize things.
It's required to update the rowversion
of TableA if the corresponding record in TableB changed. Currently it's implemented with the following SQL code in the TableB update trigger:
UPDATE TableA
SET Id = Id
WHERE Id = @id
This change brought really bad performance to my app because of a Table Spool. And update other columns in TableB will trigger different behavior.
So I want to know if there is any other way to update the rowversion
in TableA by not updating a TableA column? Any comment is much appreciated.
Upvotes: 1
Views: 1326