30.06.2013 Views

SQL Server Execution Plans - Red Gate Software

SQL Server Execution Plans - Red Gate Software

SQL Server Execution Plans - Red Gate Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 8: Advanced Topics<br />

From this point forward, without making a single change to the actual definition of<br />

the stored procedure, each execution of this procedure will be followed by a recompile.<br />

You can identify that a guide has been used by looking at the Select operator of the<br />

resulting execution plan. If we were to execute the query as shown in Listing 8.14, it<br />

would result in the information shown in Figure 8.11 being on display in the execution<br />

plan's Select operator.<br />

EXEC dbo.uspGetManagerEmployees @BusinessEntityID = 42 -- int<br />

Listing 8.14<br />

Figure 8.11<br />

So, you can see if a plan guide was applied to a stored procedure.<br />

313

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!