Tuesday, February 14, 2012

Display Estimated Execution Plan

Dear all,
I obtain a warning when I press the 'Display Estimated Execution Plan'
for the following sp:
up_Rpt_Data_Contents_Bridge_Wholesaler '2005-01-01','COW'
Server: Msg 208, Level 16, State 1, Procedure
up_Rpt_Data_Contents_Bridge_Wholesaler, Line 42
Invalid object name '#PERIODS'.
Query Analyzer is parsing all the contents for that object? Just a temp
table.
How can reckon something if not exists yet?
Thanks in advance and best regards,This is called "delayed name resolution" or something like that... SQL wil
l
repeast the name resolution when it executes the SP. Then, it checks the
actual code and makes sure that you are indeed creating a table named
#PERIODS.
"Enric" wrote:

> Dear all,
> I obtain a warning when I press the 'Display Estimated Execution Plan'
> for the following sp:
> up_Rpt_Data_Contents_Bridge_Wholesaler '2005-01-01','COW'
> Server: Msg 208, Level 16, State 1, Procedure
> up_Rpt_Data_Contents_Bridge_Wholesaler, Line 42
> Invalid object name '#PERIODS'.
>
> Query Analyzer is parsing all the contents for that object? Just a temp
> table.
> How can reckon something if not exists yet?
>
> Thanks in advance and best regards,|||Thanks for your feedback
"Enric" wrote:

> Dear all,
> I obtain a warning when I press the 'Display Estimated Execution Plan'
> for the following sp:
> up_Rpt_Data_Contents_Bridge_Wholesaler '2005-01-01','COW'
> Server: Msg 208, Level 16, State 1, Procedure
> up_Rpt_Data_Contents_Bridge_Wholesaler, Line 42
> Invalid object name '#PERIODS'.
>
> Query Analyzer is parsing all the contents for that object? Just a temp
> table.
> How can reckon something if not exists yet?
>
> Thanks in advance and best regards,|||Since your procedure creates a temp table and with "Estimated" no code is ex
ecuted, SQL Server
cannot show the plan as the table isn't created. Select Show execution plan"
and instead.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Enric" <Enric@.discussions.microsoft.com> wrote in message
news:BC203C72-A62E-460C-95FC-B2D707AD60DD@.microsoft.com...
> Dear all,
> I obtain a warning when I press the 'Display Estimated Execution Plan'
> for the following sp:
> up_Rpt_Data_Contents_Bridge_Wholesaler '2005-01-01','COW'
> Server: Msg 208, Level 16, State 1, Procedure
> up_Rpt_Data_Contents_Bridge_Wholesaler, Line 42
> Invalid object name '#PERIODS'.
>
> Query Analyzer is parsing all the contents for that object? Just a temp
> table.
> How can reckon something if not exists yet?
>
> Thanks in advance and best regards,|||It has been very useful.
Best wishes,
"Tibor Karaszi" wrote:

> Since your procedure creates a temp table and with "Estimated" no code is
executed, SQL Server
> cannot show the plan as the table isn't created. Select Show execution pla
n" and instead.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Enric" <Enric@.discussions.microsoft.com> wrote in message
> news:BC203C72-A62E-460C-95FC-B2D707AD60DD@.microsoft.com...
>
>

No comments:

Post a Comment