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: how to speed up a "select count(*) from ..."

Re: how to speed up a "select count(*) from ..."

From: Mark Russell Brown <Mark.Russell_at_rousselperier.com>
Date: 2000/05/05
Message-ID: <39133150.132208165@news.bluewin.ch>#1/1

On Fri, 5 May 2000 11:29:24 +0200, "Paolo Polce" <java.group_at_bricabrac.it> wrote:

>Hello,
>
> I have a table with 40.000 records. There was no primary key on the table
>(!) and a "select count(*) from mytable" took about 15 sec.
>So, now, I've created a primary index on mytable.id field...
>
>Well... it still takes 15 sec to count the records... :-(
>May someone help me?
>
>Thank you.
>Paolo.
>
>
>

Create a BITMAP index on any column in the table with low cardinality and you should see that SELECT COUNT(*) use the bitmap index to produce the desired result without scanning the table.

Mark. Received on Fri May 05 2000 - 00:00:00 CDT

Original text of this message

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