sys.dm_exec_query_plan question

  • why is it that when executing the following statement, the link in some rows will return graphical execution plan and in other rows they return the XML? I am just trying to figure out why the behavior is different between rows.

    SELECT b.query_plan

    FROM sys.dm_exec_cached_plans a

    cross apply sys.dm_exec_query_plan(a.plan_handle) b

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • could it be that really large execution plans are getting truncated at 8K in the grid,and since it's not valid XML with an ending tag, you only see the text version?

    that's my first guess.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • http://sqlblog.com/blogs/aaron_bertrand/archive/2011/10/28/getting-graphical-showplan-back-in-sql-server-2008-r2.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    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
  • Thanks alot. I guess my google skills were weak today.:blush:

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply