I would like to know what is the relative cost means in Execution plan

  • In SQL Query Analyzer, I have executed batch of statements enabling Execution plan.

    Now on selection of execution plan tab, I could see the plan diagrams for the sql statements in the batch executed.

    But on the top of the diagram

    i could notice,

    'Query cost (relative to the batch) <%>'

    What exactly the relative cost means

    If the percentage is greater than that of other exection plan what it means, if less then what it means?

    Please help me out.

  • if you have 2 queries in a batch/sp....and the costs are estimated to be 66% and 34%....then you can (reasonably) infer that the 1st query will take/cost approx twice the resources (time) as the 2nd.

     

    try some measurements....using getdate() above and below the queries to benchmark the elapsed times...along with using dbcc freeproccache to reset any benefits to one query of the other of data being cached!

Viewing 2 posts - 1 through 1 (of 1 total)

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