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: Index not used by query

Re: Index not used by query

From: Kevin A Lewis <KevinALewis_at_Hotmail.com>
Date: Thu, 10 Jun 1999 16:36:41 +0100
Message-ID: <aTQ73.114411$pl3.58958@newreader.ukcore.bt.net>


Presuming the system is running in 'CHOOSE' mode

the cost based optimiser works out that the 'cost' of the query by Full Table Scan is cheaper than by index.

Regards

--
Kevin A Lewis (BOCM PAULS LTD - Animal Feed Manufacturer - Ipswich England)

                        <KevinALewis_at_HotMail.com>

The views expressed herein by the author of this document are not necessarily those of BOCM PAULS Ltd. Frank Calfo <fcalfo_at_psateam.com> wrote in message news:01beb34e$41603e40$e401010a_at_FRANK...
> I'm doing a simple test on index usage:
>
> I have a table, Employee, with the columns: empid,
> name,
> type
>
> I have a simple query: select * from employee where type = 4 ;
>
> When I run an execution plan on this statement it indicates that
> Oracle will do a full table scan on the employee table.
>
> This is as expected
>
> I then add a nonunique index to the table consisting of only the type
> column
>
> I run statistics on the schema with the estimate option
>
> Then I rerun the execution plan with this same query
>
> It still indicates Oracle will do a full table scan on the table.
>
> Why won't Oracle use the index?
>
> Thanks.
>
>
Received on Thu Jun 10 1999 - 10:36:41 CDT

Original text of this message

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