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: select count(*)

Re: select count(*)

From: Yong <yhuang_at_slb.com>
Date: 2000/07/28
Message-ID: <8lsd65$rto$1@news.sinet.slb.com>#1/1

David,

You probably remembered wrong. You seem to be talking about group by after the where clause. *That* will suppress an index scan.

Yong Huang

<oratune_at_aol.com> wrote in message news:8lqdvo$abi$1_at_nnrp1.deja.com...
> This is one of those interesting aspects of Oracle that many users are
> not aware of -- count(), max(), min(), avg(), sum() all circumvent the
> indexes and perform full table scans. Let me repeat that:
>
> The functions count(), max(), min(), avg(), sum() ALL circumvent the
> indexes and perform FULL TABLE SCANS.
>
> For 10 million rows a count(*) that takes 1 minute 30 seconds (on
> average) is not bad performance. Scanning 10 million rows takes time
> and you shouldn't expect blazing speed when no index is involved.
>
> --
> David Fitzjarrell
> Oracle Certified DBA
Received on Fri Jul 28 2000 - 00:00:00 CDT

Original text of this message

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