Tuesday, March 20, 2012

query execution plan

Hi,
Could somebody explain me about the query execution plan in the sql
analyzer?
When i look at the execution plan i see several icons displaying 100% or
sometimes a higher percentage. Should all icons be 0% or does it depends
on the icon?Hi
If you have multiple 100%s then you probably have multiple batches. Within a
batch all the nodes should add up to 100% each percent indicates how much of
the total cost the given node costs.
You may want to read up on the topic "Graphically Displaying the Execution
Plan Using SQL Query Analyzer" in Books online.
John
"Jason" wrote:

> Hi,
> Could somebody explain me about the query execution plan in the sql
> analyzer?
> When i look at the execution plan i see several icons displaying 100% or
> sometimes a higher percentage. Should all icons be 0% or does it depends
> on the icon?
>|||John Bell wrote:
> Hi
> If you have multiple 100%s then you probably have multiple batches. Within
a
> batch all the nodes should add up to 100% each percent indicates how much
of
> the total cost the given node costs.
> You may want to read up on the topic "Graphically Displaying the Execution
> Plan Using SQL Query Analyzer" in Books online.
> John
> "Jason" wrote:
>
Hi John,
I've read BOL, but it doesn't say what's better. Should the total of the
executionplan be 0% or should some of the icons be 0%. I've some 400%
(index scan icon), but is that a good thing?|||Hi
Everything should total to around 100%, so having 400% for a single node is
confusing! Check your indexes are not fragmented and that the statistics are
up-to-date.
You should be looking at lowering the percentage as much as possible, but
having something that takes 50% of 1 minute is better than having something
that is 20% of 5 minutes!
John
"Jason" wrote:

> John Bell wrote:
> Hi John,
> I've read BOL, but it doesn't say what's better. Should the total of the
> executionplan be 0% or should some of the icons be 0%. I've some 400%
> (index scan icon), but is that a good thing?
>

No comments:

Post a Comment