Database Reference
In-Depth Information
Figure 17-6. Execution plan prior to data changes
please ensure that the setting for the graphical execution plan is OFF ; otherwise, the output of STATISTICS XML
won't display.
Note
While reexecuting the stored procedure, SQL Server automatically detects that the statistics on the index
have changed. This causes a recompilation of the SELECT statement within the procedure, with the optimizer
determining a better processing strategy, before executing the SELECT statement within the stored procedure, as
you can see in Figure 17-7 .
Figure 17-7. Effect of statistics change on the execution plan
Figure 17-8 shows the corresponding Extended Events output (with the auto_stats event added).
 
 
Search WWH ::




Custom Search