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: raman batra <rrbatra_at_feist.com>
Date: Mon, 19 Oct 1998 21:50:28 -0500
Message-ID: <362BFA74.644F@feist.com>


This is the right way to do it. You must analyze your data to leverage your data and indexes. The optimizer really works great after you analyze. Of course, change the INIT.ORA parameters as well, enough database buffer cache etc..

George Meltser wrote:

> I have a table with 3,5 mln rows and after it's analyzed it takes 3 seconds
> to do
> a count(*), so please stop blaming dbms.
>
> Andreas Kyritz wrote in message <70fbcl$iu1$1_at_news.ipf.net>...
> >Hallo,
> >
> >does anybody know, why a
> > SELECT COUNT(*) FROM ATABLE
> >Statement is so slow ? On a table with 250.000 rows it takes more then 30
> >seconds ?!
> >
> >The table has a primary key and the statistics were computed before
> >executing this Statement.
> >It makes no difference using COUNT(PRIMARY_KEY) instead of COUNT(*).
> >It seems that the server is doing a full-table-scan !
> >
> >The server is a P200 with 96MB RAM, NT 4.0 SP3 and Oracle 8.0.5.
> >
> >I've never seen a DBMS, which takes so much time for such a simple query.
> >
> >Thanks for your help
> >
> >--
> >Andreas Kyritz
> >AKyritz_at_easy-soft-dresden.de
> >
> >
Received on Mon Oct 19 1998 - 21:50:28 CDT

Original text of this message

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