Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Only partially optimised
Thu, May 25 2006 9:00 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

The expression:

_fkProjects = 79 AND _SleepUntil IS NULL  OR _SleepUntil <= CURRENT_DATE()

is PARTIALLY-OPTIMIZED, covers 216 rows or index keys, costs 43977 bytes, and
will be applied to the Calls table (Calls) before any joins

I have indices for both _fkProjects and _SleepUntil - why is it only partially optimised?


Roy Lambert
Thu, May 25 2006 7:24 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< The expression:

_fkProjects = 79 AND _SleepUntil IS NULL OR _SleepUntil <= CURRENT_DATE()

is PARTIALLY-OPTIMIZED, covers 216 rows or index keys, costs 43977 bytes,
and will be applied to the Calls table (Calls) before any joins

I have indices for both _fkProjects and _SleepUntil - why is it only
partially optimised? >>

It's the cost optimizer again - it is basically optimizing the expression to
make it faster with just one index scan and then a row scan.

BTW, ElevateDB does away with the "optimized", "un-optimized", etc.
nomenclature in favor of straight-forward filter and SQL plans that explain
exactly what the optimizer is doing.  That removes the confusion when the
optimizer does something like it did here.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, May 26 2006 4:12 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


So really it should say "I de-optimised the query to make it faster" <vbcg>

Roy Lambert
Tue, May 30 2006 8:36 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< So really it should say "I de-optimised the query to make it faster"
<vbcg> >>

Yes. Unfortunately, it can't say it that way at this time, so it has to say
it the only way it can. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image