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: Number of hits

Re: Number of hits

From: Gianluca Cecchi <gcecchi_at_acnielsen.it>
Date: Fri, 18 Sep 1998 11:44:31 +0200
Message-ID: <36022B7F.53D83AFA@acnielsen.it>


If you have a field on which you can create a bitmap index (for example a field which assumes few values more and more times) like this:
create bitmap index index_name on table_name (field_name) ; it takes some time to create but then you have it. Then if you want to count the records of the table you can do so, using the hints offered by oracle:
select /*+ index (table_name index_name) */ field_name, count(*) from table_name group by field_name;

Then you sum the subtotals and you are done. We have tables of 250 million of rows and it works well. Remember you should have 7.3.X version at least of Oracle where some bugs on bitmap indexes are solved (not completely actually ;-(

>
Received on Fri Sep 18 1998 - 04:44:31 CDT

Original text of this message

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