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: Count(*) is very slow

Re: Count(*) is very slow

From: Andreas Kyritz <AKyritz_at_easy-soft-dresden.de>
Date: Tue, 20 Oct 1998 16:08:13 +0200
Message-ID: <70i5pa$siv$1@news.ipf.net>


Hi Billy,

Billy Verreynne schrieb in Nachricht <70h7sq$1mv$1_at_hermes.is.co.za>... ...
>I've read several responses to this and everyone seems to suggest that an
>analyze will make it faster. I'm not so sure. Does Oracle not always use a
>FTS when doing a SELECT count(*)? I use to run SELECT count(*) on large
>tables to test PQ - and PQ only kicks in with FTS (at least with 7.x).

Now my database is very well analyzed, but it makes no difference. Why isn't it possible to use the primary key for computing SELECT count(*) FROM ...?
I think, most dbms doing it in this way.

>
>The only reason IMHO why a SELECT count(*) may be faster when an analyze
has
>been done, is for PQ processing. If an estimate stats has been made, Oracle
>spreads the processing better between the PQ processes (it uses rowid per
>select to give each PQ a chunk of the table to process). If there are no
>stats, Oracle often give all the work to 1 or 2 PQs only while the rest sit
>idle.

Unfortunenably I have only one processor in my server 8-( . Or works PQ also with one processor in 2 and more threads, there are mostly 75% free cpu-ressources on the system ?

>Or am I trying to drink from an empty Tennessee whiskey bottle here?
8-)

--
Andreas Kyritz
AKyritz_at_easy-soft-dresden.de Received on Tue Oct 20 1998 - 09:08:13 CDT

Original text of this message

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