Re: Cost Vs. Rules Based Optimisers

From: Tony Rothwell <Tony_at_santen.demon.co.uk>
Date: Mon, 20 Feb 1995 23:15:54 +0000
Message-ID: <68400354wnr_at_santen.demon.co.uk>


In article: <l.carl.pedersen-2002951138360001_at_kip-2-sn-232.dartmouth.edu> l.carl.pedersen_at_dartmouth.edu (L Carl Pedersen) writes:
>
> well, i just ran a very limited test on a piece of code that i did not NOT
> try to optimize under rule-based. so far i am not impressed. the
> cost-based optimized code seems to be as slow or slower that the
> rule-based optimized code. in one case, it took 5 minutes of cpu with
> cost-based vs 2 minutes of cpu using rule-based. in another case, the
> cost-based used the same cpu, but did improve the i/o considerably. i'm
> not sure how to compare cpu to i/o, so maybe i'm off base here.
>

What about the execution plans? With your knowledge of the data, which execution plan is better?  

> i'm also bothered by the lack of documentation on the cbo. i use a lot of
> views based on views based on .... etc. i've yet to see any clear
> guidance on how to use hints in this type of situation, or whether they
> can be used in views at all.
>

The normal approach, in my experience, is always to avoid views on views. They introduce too much abstraction and increase the likelihood of poor SQL, like WHEREs on GROUP BY views unnecessarily being converted to HAVINGs, etc.

-Tony. Received on Tue Feb 21 1995 - 00:15:54 CET

Original text of this message