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

Index not used by query

From: Frank Calfo <fcalfo_at_psateam.com>
Date: 10 Jun 1999 14:29:14 GMT
Message-ID: <01beb34e$41603e40$e401010a@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 - 09:29:14 CDT

Original text of this message

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