SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Where to find query cost?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 11/13/2013 :  13:27:59  Show Profile  Reply with Quote
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

Sweden
30219 Posts

Posted - 11/13/2013 :  14:29:49  Show Profile  Visit SwePeso's Homepage  Reply with Quote
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 - 11/13/2013 :  15:17:40  Show Profile  Reply with Quote
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

India
52317 Posts

Posted - 11/14/2013 :  02:18:14  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000