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: Stephan Schlecht <stephan_at_software7.de>
Date: 2000/05/05
Message-ID: <3912C427.6228978@software7.de>#1/1

> 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... :-(

You could try to use "select count(1) from mytable", but I never tried how much faster this is.

Stephan Schlecht

--
Software 7 GmbH
Regensburg          
http://www.software7.de
Received on Fri May 05 2000 - 00:00:00 CDT

Original text of this message

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