Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Dead slow count(*)

Re: Dead slow count(*)

From: Jan Pruner <JPruner_at_email.cz>
Date: Fri, 30 Jan 2004 01:09:53 +0100
Message-ID: <4019A0D1.3040207@email.cz>


If You use function COUNT, Oracle will always do fullscan!!! So, first question should be - Do I really need to use COUNT?

++++++++++++++++++++++++

How much memory do you have?

How big is your average table row (kB,MB)?

What is your EXPLAIN PLAN output?
etc.

JP

Jordi Adame V wrote:
> Hi!
>
> I have this table with ~4,000,000 entries
>
> When i do a SELECT COUNT(*) FROM TABLE_NAME
>
> it takes 4 hours to give me the result, this is way too much
>
> Im running Oracle 9.2.0.4.0 on RedHat AS 3
>
> These are my first experiences with Oracle, so I have no clue how to fix this
> query time... Any help would be nice
>
> regards
>
> Jordi



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu Jan 29 2004 - 18:09:53 CST

Original text of this message

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