Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: count(rowid) vs count(*)
Tests that I ran - a while back now, must be on 7.1 I guess, showed
this to be untrue, and that count(*) performed better than count(1).
Maybe this has been optimised (it would make sense wouldn't it?)
Andy
Roger Jackson wrote:
>
> Hi,
>
> I was reading an article just recently which stipulated that you should not
> use count(*) to determine the number of rows in a table, but use count(1) or
> count(ROWID) instead. These options are faster because they bypass some
> unnecessary operations in Oracle's SQL processing mechanism.
>
> Can somebody explain to me why this would be faster and what mechanisms are
> bypassed.
>
> TIA
>
> Roger
Received on Mon Jul 12 1999 - 07:42:40 CDT
![]() |
![]() |