Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Where to find query cost?

Author  Topic 

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 2013-11-13 : 13:27:59
If I run sample query below against an adventureworks database
where can I find query cost?


USE AdventureWorks;
GO
EXEC dbo.uspGetManagerEmployees 140;

Does estimated subtree cost for in the actual execution plan (when right click SELECT operator in the execution plan) is considered query cost?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2013-11-13 : 14:29:49
It depends on what the stored procedure does. There may be hundreds of statements. All of them together is the SP cost.


Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 2013-11-13 : 15:17:40
Peter, where do you see cost for entire SP execution inside the execution plan?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-11-14 : 02:18:14
quote:
Originally posted by cshah1

Peter, where do you see cost for entire SP execution inside the execution plan?


entire SP cost would be 100% and exeution plan gives split up for various component statements/batches

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -