Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: count(*) v. count(pk)
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