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(*) v. count(pk)

Re: count(*) v. count(pk)

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 01 May 1998 18:45:54 GMT
Message-ID: <01bd7530$1346a9c0$0300a8c0@WORKSTATION>

In later versions of Oracle, I think count(*) can access the meta-data in the block without having to examine real data, which avoids working down the row directory list.

> What surprises me is the fact that COUNT(*) is realy faster than
> COUNT(anything_else) - I tested that on some of my test tables and
> COUNT(*) was approximately 10% faster. I allways thought it is the
> other way around, because I assumed that with COUNT(*) the parser
will
> have some extra work identifying all the table columns from the
> dictionary. Can anyone explain where does this execution time
> difference between COUNT(*) and COUNT(anything_else) come from?
>
Received on Fri May 01 1998 - 13:45:54 CDT

Original text of this message

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