Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

how to know Graphical Execution Plans works through xmlcode in sql server? Expand / Collapse
Author
Message
Posted Wednesday, December 19, 2012 1:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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
Posted Wednesday, December 19, 2012 1:27 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:17 PM
Points: 42,450, Visits: 35,505
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
Posted Wednesday, December 19, 2012 5:50 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 7:51 AM
Points: 825, Visits: 2,659
http://www.sqlservercentral.com/articles/books/94937/




The SQL Guy @ blogspot

@SeanPearceSQL

About Me
Post #1398338
Posted Wednesday, December 19, 2012 7:07 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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
Posted Wednesday, December 19, 2012 7:13 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:12 AM
Points: 5,142, Visits: 4,930
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
Posted Wednesday, December 19, 2012 9:06 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:17 PM
Points: 42,450, Visits: 35,505
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
Posted Wednesday, December 19, 2012 9:09 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Friday, June 27, 2014 12:43 PM
Points: 15,444, Visits: 9,596
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 »

Add to briefcase

Permissions Expand / Collapse