Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why my index is not used?
On 17.01.2007 15:43, Ana Ribeiro wrote:
> Please explain me one more thing: even with no predicates which can use
> an index on the tables Step and Script now we can see that indexes are
> being used ... Do you understand why?
The generic explanation is that Oracle will sometimes use the index if it can satisfy the query from the index alone, i.e.,
create table foo ( c1 varchar2(10), c2 varchar2(10) ) create index idx_foo on foo ( c1, c2 )
select c2
from foo
where c1 = 'bar'
Oracle does not need to go to the table to retrieve the value(s) of c2.
Kind regards
robert Received on Wed Jan 17 2007 - 09:10:21 CST
![]() |
![]() |