Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Number of hits
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