Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Any way to get RowCount by not using Select count(*) from table
There is also the possibility of counting through a bitmap index if your table has one.
Unlike b-tree indexes, bitmap indexes include nulls, and since bitmap indexes can be ___extremely___ small compared to the table and b-tree indexes, the result can appear staggeringly quickly.
Jonathan Lewis
Jurij Modic <jmodic_at_src.si> wrote in article
<36928607.9341736_at_news.siol.net>...
>
> Definitelly the fastest method for counting all records in a large
> table is a new operation called "fast full index scan", available
in
> Oracle 7.3.3 and above. If optimizer chooses this operation (you
can
> help him in this decision with a hint), the index blocks are read
in
> the simmilar fashion as when doing full table scan. There is an
> article about this fast full index scan in july/august isue of the
> Oracle Magazine. It is written by Guy Harrison. In the article he
also
> presents the results of his tests counting all rows from a
1,000,000
> rows table using different access operations. Average times for
> counting all rows are:
> - using full index scan: 17.76 sec
> - using full table scan: 12.53 sec
> - using fast full index scan: 4.94 sec
Received on Tue Jan 05 1999 - 00:00:00 CST
![]() |
![]() |