Re: ORACLE optimiser question

From: Susan Richards <lnuscsi.sricha01_at_eds.com>
Date: 1996/06/17
Message-ID: <31C58455.68D1_at_eds.com>#1/1


Gene Gurevich wrote:  

> I have a query:
>
> SELECT FILED1, count(*)
> FROM TABLE1
> GROUP BY FILELD1;
>
> The TABLE1 has an index on FILELD1. The ORACLE optimizer (7.1), however, does
> not use this index, accrording to the analyze statement, rather it does a
> FULL table search.. . Does anyone know why?

It would appear to me that you are doing a count(*) therefore it has to scan the table to determine this value. Also you do not have a WHERE clause in this statement, the size of your table may cause the optimizer to feel it is more efficient to scan.

Susan Richards Received on Mon Jun 17 1996 - 00:00:00 CEST

Original text of this message