Re: Reading Execution Plan

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 12/23/04


Date: Thu, 23 Dec 2004 23:16:14 +0100

On Thu, 23 Dec 2004 09:41:01 -0800, C TO wrote:

>Hello World,
>
>May I ask how to reason the following:
>
>I have two queries which return exactly the same results (and 220 rows). I
>place the two queries and run a execution plan behind them. The one that
>takes 10 seconds by itself now with "Query cost (relative to the batch)"
>92.44%, while the other that takes 20 seconds with a "Query cost (relative to
>the batch)" only 7.56%.
>
>Based on this info, what kind of actions I should take?
>
>Thanks.

Hi C TO,

Did you clear out the cache between the executions? Run the following
commands before each query if you want to get meaningfull comparisons:

CHECKPOINT
DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE

Best, Hugo

-- 
(Remove _NO_ and _SPAM_ to get my e-mail address)


Relevant Pages

  • Re: Reading Execution Plan
    ... > May I ask how to reason the following: ... > place the two queries and run a execution plan behind them. ... Zach ...
    (microsoft.public.sqlserver.programming)
  • Re: Foreign Key Indexes
    ... execution plan that uses it in my tests. ... > Ummm ... ... > you're not going to see many query plans that will use it. ... the really good reason for such ...
    (microsoft.public.sqlserver.programming)
  • Question for 10g enthusiasts
    ... After migration I found out that some SQL queries generated by the use ... force Oracle to use the better execution plan for all users. ...
    (comp.databases.oracle.server)
  • execution plan
    ... Can anyone tell me a little more about the execution plan. ... option to find out ways to speed up my queries which use cursors. ... Can anything be done on the DB administration level that speeds this query ...
    (microsoft.public.sqlserver.programming)
  • Re: Tuning tool
    ... execution plan. ... The tuning tool ... seems only applicable to the most used queries in the database, ...
    (comp.databases.oracle.server)