Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: select count(*)
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
![]() |
![]() |