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

Home -> Community -> Usenet -> c.d.o.server -> Re: Tuning View

Re: Tuning View

From: Oliver Deckert <oliver.deckert_at_metronet.de>
Date: 1996/12/28
Message-ID: <01bbf4e3$30f90400$3d65a8c0@pentium>#1/1

In article <595rkf$sgf_at_sigov1.sigov.si> Dušan Pirc <Dussan.Pirc_at_mop.sigov.mail.si> had a small problem with Oracle Tuning.

I think the key to better performance is to force the optimizer to use the small local table as "driving" table for the execution of the statement. There are two possibilities to force the optimizer. Either change the table order in the select statement of the view because the optimizer uses the tables in reverse order when no special index can be used. Then you have
 create view view1
 as select ID, attr2, attr2, ... from table2, table1  where KID1 = KID2;

The other way is to use an optimizer hint like  create view view1
 as select /*+ ORDERED */ ID, attr2, attr2, ... from table1, table2  where KID1 = KID2;
or
 create view view1
 as select /*+ USE_NL ( table1 table2 ) */ ID, attr2, attr2, ... from table1, table2
 where KID1 = KID2;

Oliver Received on Sat Dec 28 1996 - 00:00:00 CST

Original text of this message

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