Message-Id: <10713.124807@fatcity.com> From: Abdul Aleem Date: Mon, 18 Dec 2000 08:15:58 +0500 Subject: RE: Count(*) Vs Count(1) This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C068A0.DA6D85B0 Content-Type: text/plain; charset="iso-8859-1" Some where in Oracle Documentation I remember reading that Oracle encouraged using Count(1) over Count(*). HTH! Aleem -----Original Message----- From: Sanjay Kumar [mailto:ora_user@hotmail.com] Sent: Saturday, December 16, 2000 12:51 AM To: Multiple recipients of list ORACLE-L Subject: Count(*) Vs Count(1) Hi, I issed the following two statements and generated a plan using Explain Plan. The table on which I tried this query was v$cache. Select Count(*) from v$cache Select Count(1) from v$cache I found that the explain plan generated the same plan for both the statements. Does that mean that both the statements are equally efficient. In my opinion, I feel that Count(1) is better than Count(*). Kindly explain. Thanks Rgds Sanjay ------_=_NextPart_001_01C068A0.DA6D85B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

S= ome where in Oracle Documentation I remember reading that Oracle encouraged using = Count(1) over Count(*).

H= TH!

A= leem

<= ![if = !supportEmptyParas]> 

=

-----Original Message-----
From: Sanjay Kumar [mailto:ora_user@hotmail.com]
Sent: Saturday, December = 16, 2000 12:51 AM
To: Multiple recipients = of list ORACLE-L
Subject: Count(*) Vs = Count(1)

 

Hi,=

 =

I issed the following two statements and generated a plan using Explain Plan. = The table on which I tried this query was v$cache.=

 =

Select Count(*) from v$cache

 =

Select Count(1) from v$cache

 =

I found that the explain plan generated the same plan for both the statements. = Does that mean that both the statements are equally = efficient.=

 =

In my opinion, I feel that Count(1) is better than = Count(*).=

 =

Kindly explain.

 =

Thanks=

Rgds=