June 2015
Intermediate to advanced
1800 pages
70h 6m
English
When displaying the estimated execution plan for a stored procedure, you see multiple statement operators as inputs to the Stored Procedure operator, especially if you have any conditional branching in the stored procedure. One operator exists for each statement defined in the stored procedure. When conditional branching occurs in the stored procedure, SQL Server does not know at query optimization time which statements in the stored procedure will actually be executed, so it has to estimate a query plan for each individual statement. An example is shown in Figure 36.7.
FIGURE 36.7 Estimated execution plan for a stored ...
Read now
Unlock full access