Some tips for using SQL Server 2019 triggers Try to minimize the number of rows affected in a trigger. The more number of rows affected in a trigger, the more time a trigger takes to run. So, try to reduce the number of rows affected in a trigger. Consider disabling trigger’s recursion. Triggers are said to be recursive when a...
Tag: DML
Tips for using SQL Server 2014 triggers
Tips for using SQL Server 2014 triggers Try to minimize the DML trigger’s code size. Triggers fire during INSERT, UPDATE, or DELETE statements, so the more code that runs in the trigger, the slower each INSERT, UPDATE, and DELETE that fires it will be. Use cascading referential integrity constraints instead of triggers whenever possible. For example, if you need to...
Tips for using SQL Server 2012 triggers
Tips for using SQL Server 2012 triggers Microsoft SQL Server 2012 introduces many new useful stored procedures, functions and operators. Some actions you can perform without these new features, but usually using them provides more easy and effective way to accomplish the same goal. In this article, you can find some tips to use triggers in SQL Server 2012. Try...