instead of trigger | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

instead of trigger

Hi all, I am having big performance problems with scenario where I hope to capture values from inserted. Update query contains where clause id = 23123233455. Problem is that this id value is a derived value (combination of 2 columns from the source table), and therefore cannot be indexed. Is there any way that capturing the inserted value for this id can be captured faster the the 17 seconds per update that it currently takes. Help on this appreciated.
Why are you using derived columns? instead you can use a trigger to update that column —————————————-

I am using a instead of trigger in the first place is because I am "updating" a unioned view. The reason why I am using a derived column is because I need to use one of the values (embedded in the derived value) to be able to update the value in another table. Even where I am submitting update which does not affect any rows (due to the fact that you cannot update unioned view), it tries to look value in the table view is based on and after not finding the value 17 seconds decides to return the inserted id value (from the where clause). This is unacceptable. Is there no way to speed this up?(in my opinion the validation in this case is completely unnecessary, especially as it eventually returns the desired value without error).