Sorting an Execution Plan

  • I have an execution plan that is huge, the pdf it generates if I print it is over 1000 pages. Is there a way to change the graphical plan into a table, so I can sort the %, and find the items that are taking the longest?

  • I'm not sure if using SET SHOWPLAN_ALL is a valid option for your case. Maybe you could query the XML from the plan.

    But, I wouldn't use this approach as the cost are just estimates and won't always reflect the real problems.

    EDIT: I forgot to mention. "SQL Server Execution Plans, Second Edition by Grant Fritchey"[/url] has a complete chapter on text/XML query plans.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Dan Guzman - Not the MVP (9/29/2014)


    I have an execution plan that is huge, the pdf it generates if I print it is over 1000 pages. Is there a way to change the graphical plan into a table, so I can sort the %, and find the items that are taking the longest?

    Is a cursor involved?

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • Plan Explorer from SQL Sentry.

    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
  • Sean Pearce (9/30/2014)


    Dan Guzman - Not the MVP (9/29/2014)


    I have an execution plan that is huge, the pdf it generates if I print it is over 1000 pages. Is there a way to change the graphical plan into a table, so I can sort the %, and find the items that are taking the longest?

    Is a cursor involved?

    No cursers here, just too many subqueries and open joins

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

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