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: Help: Strange sql behaviour

Re: Help: Strange sql behaviour

From: D.Y. <dyou98_at_aol.com>
Date: 21 May 2002 09:30:31 -0700
Message-ID: <f369a0eb.0205210830.3ce7e18b@posting.google.com>


"charlie.peltier" <charlie.peltier(delete here-antispam)@verizon.net> wrote in message news:<KEpG8.10333$Ou5.8696_at_nwrddc03.gnilink.net>...
> The thing is, index scan are faster, full table scan are slower, but oracle
> favor full table scan. If we use cost, I can understand, because Oracle can
> make mistakes in judging which is more expensive.
> What I can not understand is why in rule_based optimizer mode, Oracle still
> favor full table scan. I thought that rule based means that always use
> index if there is one.
>

If you use the correct syntax (/*+ rule*/) oracle will try to use index when there is one on the join columns. If your syntax is wrong oracle won't complain, it simply ignores it. That said, index scan can be slower than a table scan if your table is relatively small or the selectivity on the indexed columns is very low.

> Am I right?
>
> Thanks
> "Galen Boyer" <galenboyer_at_hotpop.com> wrote in message
> news:uwutyxg0e.fsf_at_rcn.com...
> > On Mon, 20 May 2002, charlie.peltier(delete here-antispam)@verizon.net
> > wrote:
> >
> > > But after we analyze table life,
> >
> > [...]
> >
> > > In the above three tables, we can only analyze two tables, life table
> > > can not be analyzed
> >
> > Which is it?
> >
> > What is/are the plan/s?
> >
> > --
> > Galen deForest Boyer
> > Sweet dreams and flying machines in pieces on the ground.
Received on Tue May 21 2002 - 11:30:31 CDT

Original text of this message

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