Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
how to know Graphical Execution Plans works...
how to know Graphical Execution Plans works through xmlcode in sql server?
Rate Topic
Display Mode
Topic Options
Author
Message
Satish Hottur
Satish Hottur
Posted Wednesday, December 19, 2012 1:11 AM
Forum Newbie
Group: General Forum Members
Last Login: Friday, December 21, 2012 1:48 AM
Points: 2,
Visits: 7
i am trying to figureout this issue if anyone know please let me know the process of this..
Issue with Graphical Execution plan how it works/internally
If we run this below query it returns result in one column in xml code..
If we click this link it opens graphical execution plan.
SELECT
[st].[objectid]
, [st].[text]
, [qp].[query_plan]
FROM sys.dm_exec_cached_plans cp
CROSS APPLY sys.dm_exec_sql_text ( cp.plan_handle ) st
CROSS APPLY sys.dm_exec_query_plan ( cp.plan_handle ) qp ;
May i know the process how it work it little bit urgent..
advanced Thanks for your suggestions.I am waiting for your replies....
Post #1398222
GilaMonster
GilaMonster
Posted Wednesday, December 19, 2012 1:27 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 4:08 PM
Points: 38,099,
Visits: 30,392
What specifically are you looking to know and why?
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1398226
Sean Pearce
Sean Pearce
Posted Wednesday, December 19, 2012 5:50 AM
Old Hand
Group: General Forum Members
Last Login: Today @ 4:59 PM
Points: 386,
Visits: 1,425
http://www.sqlservercentral.com/articles/books/94937/
The SQL Guy @ blogspot
About Me
Post #1398338
Satish Hottur
Satish Hottur
Posted Wednesday, December 19, 2012 7:07 AM
Forum Newbie
Group: General Forum Members
Last Login: Friday, December 21, 2012 1:48 AM
Points: 2,
Visits: 7
SELECT
[qp].[query_plan]
FROM sys.dm_exec_cached_plans cp
CROSS APPLY sys.dm_exec_sql_text ( cp.plan_handle ) st
CROSS APPLY sys.dm_exec_query_plan ( cp.plan_handle ) qp ;
1) If we execute this query it returns result in xml code.
2) If we click that xml code it opens executionplan.sqlplan tab in ssms it shows Graphical Execution plan.
I am trying to findout how it works internally......
Please let me know if anyone knows.
Post #1398386
anthony.green
anthony.green
Posted Wednesday, December 19, 2012 7:13 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 2:40 AM
Points: 5,075,
Visits: 4,833
The XML name space in the XML is <ShowPlanXML xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan".....> so it knows that its a query plan and then opens it in the correct format
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1398389
GilaMonster
GilaMonster
Posted Wednesday, December 19, 2012 9:06 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 4:08 PM
Points: 38,099,
Visits: 30,392
Satish Hottur (12/19/2012)
I am trying to findout how it works internally......
How what works? The graphical view of the XML file? That's just an SSMS feature, the management tool can interpret the XML plan and display it in a graphical format. Nothing to do with SQL Server itself.
What are you trying to figure out here?
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1398483
GSquared
GSquared
Posted Wednesday, December 19, 2012 9:09 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 1:45 PM
Points: 15,442,
Visits: 9,572
The graphical plans aren't "internal". They're done in the presentation layer (usually Management Studio) from the XML.
If you want to copy that functionality to a different application, you'll have to write code for it. It's not something SQL Server does, it's something applications do.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #1398489
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.