Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Optimizer

Re: Optimizer

From: Tom Leary <tleary1_at_uswest.net>
Date: Sun, 17 Dec 2000 06:16:24 -0800
Message-ID: <a72%5.100$_q6.27121@news.uswest.net>

Tom,

The optimizer Does Not force the view to be run before before the index. To the CBO (Cost Based Optimeizer - your friend) the view is resolved to it's actual SQL with the user supplied criteria before it attempts to apply optimization and perform the execution of the query. If your queries are doing FTS (Full Table Scans) then the optimizer either does not know of a better path (have the tables been analyzed with the indexes?) or it thinks a large percentage of the rows of the indexed table will be returned so a parallel ful scan will be faster than a serial indexed lookup. These concepts are discussed in the Server Docs and in most DBA/Tuning books. CBO will not be used on indexes unless the tables have been analyzed after the index creation because the CBO is ignorant of them until this is done.

HTH DBA Tom

"SHRIKE" <tdeseamus_at_impacthire.com> wrote in message news:t3ihe71h9vk00c_at_corp.supernews.com...
> I have some PL/SQL code that retrieves records based on user supplied
> criteria that runs against a view. The optimizer forces the view to be
 run
> before the index and a full table scan to be run against the view. This
 has
> caused the operation to slow down considerably. Does anyone know of a way
> to force the index to be run before the view? We have tested replacing
 the
> view with imbedded sql statements, and this works, however this course
 would
> involve a great deal of code re-write.
>
> Thanks,
> Tom
>
>
>
Received on Sun Dec 17 2000 - 08:16:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US