SQL Exec Stats, Copyright © 2006-2010 Elemental Inc. All rights reserved.

Read Me, Intro, Main, General, Databases, File IO, Tables, Indexes, Exec Stats, Stored Procs, Dist Stats, Appendix

Stored Procedures

ExecStats get a list of the stored procedures and functions in each selected database. In the exec query stats modes, if the SQL belongs to a stored procedure or function, a reference is indicated. In the Stored Procedure - Estimated Plan mode, ExecStats will attempt to generate the estimated execution plan for each procedure.

If a stored procedure defines a temp table with the CREATE TABLE statement, the estimated execution plan is aware of the temp table definition. If a table is created with SELECT INTO #t, then it is necessary to create the table first. The Exec Stats tool has a provision for creating temp tables prior to generating the estimated execution plan. However, if more that one procedure uses a temp table created with SELECT INTO of the same name, then there could be a conflict.