Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle problem with "Select *"
And it makes perfect sense because when you have no WHERE clause you are telling Oracle that you want all values from the table for the SELECTed columns. So, Oracle must scan the entire table to give you what you want. In this case, an index may even slow down the retrieval if the table is big enough.
In article <965247873.1605.2.pluto.d4ee154e_at_news.demon.nl>,
"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
> full table scan depends on the where clause or absence of where clause
> *only*. It doesn't necessarily depend on the select list. However if
you use
> an indexed column (s) in the select list and the where clause it might
not
> even read the table.
> I am afraid you need to read either the Oracle Performance Tuning
manual
> and/or the tuning book of Rich Niemic, published by Osborne/Oracle
Press.
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
> <chrisabruce_at_yahoo.com> wrote in message
news:8m9s3f$94h$1_at_nnrp1.deja.com...
> > I am new to Oracle and have noticed that Oracle will not use indexes
> > when I use a "Select *" statement. Everytime, it does a full table
> > scan. However, when I specify columns explicitly, it will use the
> > correct indexes and return results very quickly. I am sure this is
> > well known to you Oracle experts, but is there a url someone can
direct
> > me to that has more information on this?
> >
> >
> > Thanks,
> >
> > Chris Bruce
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Aug 03 2000 - 00:00:00 CDT
![]() |
![]() |