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: Any way to get RowCount by not using Select count(*) from table

Re: Any way to get RowCount by not using Select count(*) from table

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: 1999/01/05
Message-ID: <01be38fc$9bffcfe0$0300a8c0@WORKSTATION>#1/1

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

Original text of this message

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