Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL vs. Oracle
I disagree. Even if your date is neatly sorted in the database, you still
scan the entire table. Just experiment a little with cost on explain plan.
It is not effecient.
Daniel
Austin, TX
"Terry Dykstra" <tdykstra_at_cfol.ab.ca> wrote in message
news:vq4k4.95395$n3.1904625_at_news0.telusplanet.net...
> If you have skewed data (e.g. 90% of your data has one value, the other
10%
> has 5000 values), using an index definitely can be bad if you need to
access
> the single value that's in the 90% range.
>
> --
> Terry Dykstra
> Canadian Forest Oil Ltd.
> Check out Sybase Developer's Network: http://www.sybase.com/sdn
>
> Daniel <delj_at_flash.net> wrote in message
> news:86qio2$re_at_journal.concentric.net...
> > Don't know 'bout you but most of my tables are very large. If it isn't
> > using an index, it is doing a full table scan and beating my hard drives
> to
> > death. In addition to beating my hard drives, it takes much longer to
do
> a
> > full table scan. Cost based optimization would try to use indexes, not
> > rules based. First rows is good if you want to use hints. See my
> original
> > example. The RDBMS should have used the index for an inner join. The
> index
> > was there. It is faster and more cost efficient to use the index, why
> > should I have to tell the most powerful and expensive RDBMS on the
planet,
> > to use an index that is available for the field referenced in my where
> > clause. The only time using an index is bad, is when the index is
> corrupt.
> > Can you think of an example to support your statement that sometimes it
is
> > bad?
> >
> > Daniel
> > Austin, TX
> >
> > > What makes using an index so good ?
> > >
> > > Sometimes using an index is good - sometimes its bad.
> > >
> > > If you want to use the index in almost all situations, make your
> > > optimiser rule based or first rows based.
> > >
> > > HTH
> > > --
> > > ===========================================
> > > Connor McDonald
> > > "These views mine, no-one elses etc etc"
> > > connor_mcdonald_at_yahoo.com
> > >
> > > "Some days you're the pigeon, and some days you're the statue."
> >
> >
>
>
Received on Thu Jan 27 2000 - 17:27:57 CST
![]() |
![]() |