Oracle if updating column
USE Adventure Works2012; GO IF EXISTS (SELECT name FROM sys.objects WHERE name = 'reminder' AND type = 'TR') DROP TRIGGER Person.reminder; GO CREATE TRIGGER reminder ON Person.
Address AFTER UPDATE AS IF ( UPDATE (State Province ID) OR UPDATE (Postal Code) ) BEGIN RAISERROR (50009, 16, 10) END; GO -- Test the trigger.
There probably won't be any perceptible difference unless the data set is massive, but you can check out the execution plan and/or statistics. Performance: My query: 0.02s, 0.01s, 0.02s, 0.02s, 0.02s rudy's query: 0.02s, 0.02s, 0.02s, 0.02s, 0.01s disgracian's query: 0.01s, 0.01s, 0.00s, 0.02s, 0.02s EDIT: I have run each query 5 times. I would say that the performance results are inconclusive overall.
You would either need 5-10 times more data before performance started to really diverge.
That is quite interesting about the order, and I'm not sure why that would happen.
The column can be of any data type supported by SQL Server.
However, computed columns cannot be used in this context. Multiple columns can also be tested for INSERT or UPDATE actions by using COLUMNS_UPDATED.
Here your table having millions of records that are being updated means millions of records will be updated first in INDEX as well.