Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Index to speed up "select count(*) from" queries...
Hi,
you can speed up it, when your table has a primery key:
select count(*) from table is the same like select count(primary_key_column) from table (but faster over the index). If you have a query like select coumt(*) from table where col='BLA' ==> make a (bitmap) index on col. Over bitmap indexes you can speed up even queries like 'select count(col) from table where col is null'! Offcourse you need at least Oracle 7.3. ...
tim_mcconechy_at_my-dejanews.com wrote:
>
> My application needs to do some count(*) queries...
>
> Is there some kind of index I can use to speed this query..
>
> On a table with 100000 records it takes a couple seconds longer than I
> would like...
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
Received on Mon May 17 1999 - 07:41:42 CDT