![]() However, these options cause the creation of a new execution plan. SQL Server allows changing some settings of the session connections with help of the SET options. In the second execution of the stored procedure, we will only see the sp_cache_hit event because the query plan isĪnother point about SQL Server stored procedure execution plan recompilation is related to the connection options. Query plan is inserted into the query plan cache. Also, we can see that after the first execution of the stored procedure, its These two events prove that SQL Server stored procedures areĬompiled in their first execution. The sp_cache_insert event indicates that theĮxecution plan is inserted into the query plan cache. We can find out this plan in the query plan tab. At the same time, the query_post_compilation_showplan captures the estimated execution plan and The query_post_compilation_showplan event indicates that the stored procedure was compiled after Order to enable this filter, we will add a filter expression to object_type with the database name filter.ĮXEC GetProductionList ProductIdNumber = 757Īfter the first execution stored procedure, two events is captured and these are :
0 Comments
Leave a Reply. |