1

I'm performance tuning a SQL Server trigger that has several statements using the "inserted" and "deleted" tables.

How can I break out those individual queries from the trigger for testing in order to see their estimated execution plans?

The "inserted" and "deleted" tables have no context outside of a trigger. I want to make sure that it mimics the behavior of the trigger as closely as possible.

The trigger I'm testing is INSTEAD OF DELETE. I was hoping not to actually delete the record so that I could easily test the before and after without deleting the row.

0

1 Answer 1

0

For testing and performance tuning purpose, you can just surround the DELETE statement with BEGIN TRANSACTION ... ROLLBACK

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.