Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Cost optimizer in Oracle 7.3.2.1.0 for Digital Unix
In article <59nkru$jmu_at_cdn_news.telecom.com.au>, Jonas Plumecocq
<jplumeco_at_vitgbsd1.telstra.com.au> writes
>
>We have had similar problems with the cost based optimizer. One query, which
>normally took approx 5 seconds, took 15 minutes using the cost based optimizer.
>The cost based optimizer totally buggered up and went for full table scans of
>all tables. The peculiar thing was, that the thing that caused it to do this
>was the condition "column_name = columname" as a result of a decode statement
>(depending on some other value).
>It didn't like 1 = 1 either.
>Take this out, and it works fine.... If anyone has an explanation for this, I'd
>like to hear it. We got Oracle world wide support onto it a couple of months
>ago and haven't heard from them since on the topic.
>
Both of those conditions are always true, implying (sort of) that the
query will return all the rows. A full table scan is the best way to
return all rows.
Obviously this isn't a complete explanation as it ignores other parts of the query, but if the optimiser was jumping to the same conclusion it might behave as described
-- Jim SmithReceived on Tue Dec 24 1996 - 00:00:00 CST
![]() |
![]() |