January 21, 2009 at 11:45 am
Is there any significant benefit of replacing triggers with stored procedures ?
January 21, 2009 at 12:00 pm
They are two different things.
A trigger fires in response to either data manipulation, a DML trigger, or certain structural changes, a DDL trigger.
A stored procedure is a piece of TSQL code, sitting idly by until called by some outside source. You can even have triggers call stored procedures.
So if you drop a trigger and move it's code into a proc... nothing will happen.
Triggers are frequently over-used and used instead of more appropriate code, usually in a stored procedure. Eliminating inappropriate triggers often results in performance improvements.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply