Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12554

How Plan Cache hit works for Triggers

$
0
0

Whitepaper on Cache Plan Reuse:>

Trigger-Related Issues

For a trigger execution, the number of rows affected by that execution (as measured by the number of rows in either the inserted or deleted table) is a distinguishing factor in determining a Plan Cache hit. Note that this behavior is specific to triggers, and does not apply to stored procedures. In INSTEAD OF triggers, the "1-plan" is shared by executions that affect both 0 and 1 row, whereas for non-INSTEAD OF ("AFTER") triggers, "1-plan" is only used by executions that affect 1 row and "n-plan" is used by executions that affect both 0 and n rows (n > 1).

how can we find in plan cache for "1 Plan and n-plan?

Manish


Viewing all articles
Browse latest Browse all 12554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>