Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2010
    Posts
    2

    Unanswered: How to interpret showplans

    SQL Server has a feature that shows a text or graphical showplan.

    But how do I interpret the information from the showplan? What am I looking for?

    I see things like Compute Scalar Cost, Stream Aggregate Cost, table scan etc, what am I suppose to do with these information?

    Is there any tutorials that explain how to interpret a showplan? I'm new to this showplan and any help appreciated.

  2. #2
    Join Date
    Feb 2004
    Posts
    492
    Usually, when I look at the plan, I see to find any irregularities or things that I don't expect. The main question for me is: what are the most costly parts, does that make sense or should I try to reduce it?

    I'm not aware of any tutorial or documentation on how to interpret the plan, perhaps it just boils down to experience and fiddling about?

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Graphical is easier especially when starting out.

    There is lots of documentation about interpreting plans, but to get the most out of them you also need quite a lot of rounded knowledge of SQL Server, T-SQL and a good understanding of what you expect to see and what would be a warning.

    For example, table scans and hash joins might be fine. However, if you see these and your query is designed to return a single row then you would want to investigate. Conversely, a seeing lookups\ seeks on a table where more than around 5% of the table is returned is also of concern.

    However, as a starting point I would look at the percentage cost of each node. The most expensive ones are the ones to focus on. As you focus on a node, google it (BoL IIRC is not very good on this topic) and learn what you can.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Craig Freedman's blog is one good resource. Try reading, for example, his series on JOINS. NOTE - start at the oldest and work more recent.
    Browse by Tags - Craig Freedman's SQL Server Blog - Site Home - MSDN Blogs
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Oct 2010
    Posts
    2
    Thank you, the information is helpful.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •