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: Mon, 26 Oct 1998 19:49:29 +0100
Message-ID: <712gh0$lcg$1@news.ipf.net>


Hallo Reid,

time for executing COUNT(ROWID) instead of COUNT(*) is nearly the same. The only thing which real helps, is to include:

    fast_full_scan_enabled=true
to the init.ora file (Oracle 8 only) . (see http://www.oramag.com/oracle/98-Jul/dba.html)

I've queried the v$sysstat table, sorts(disk) where only 1,5% of sorts(memory).
This seems to be no problem 8-).

Thanks

--
Andreas Kyritz
AKyritz_at_easy-soft-dresden.de

Reid Lai schrieb in Nachricht <3630ADC5.F6238D76_at_hk.super.net>...
>Can you try to see if performance has been improved after changing COUNT(*)
to
>COUNT(ROWID)?
>
>If no, you can issue the query as follow:
>
>SELECT
> NAME, VALUE
>FROM
> V$SYSSTAT
>WHERE
> NAME IN ('sorts(memory)','sorts(disk)') ;
>
>If you see 'sorts(disk)' have a high value, please increase the value of
>ORT_AREA_SIZE in INIT.ORA. Be careful on ORT_AREA_RETAINED_SIZE. Try
>to decrease this value at the same time.
>
>And also, memory occupied by OS process will not be released since Oracle
will
>not shrink back to original size after sorting.
>
>If you still get problems after tuning SORT_AREA_SIZE, try
SORT_DIRECT_WRITES.
>You can refer to DB Admin Guide.
>
Received on Mon Oct 26 1998 - 12:49:29 CST

Original text of this message

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