Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Count(*) Vs Count(1)
count(*) vs count('chad')
-----Original Message-----
From: Weaver, Walt [mailto:wweaver_at_rightnow.com]
Sent: Friday, December 15, 2000 5:22 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: Count(*) Vs Count(1)
I think we should send this whole sordid affair up to the Supreme Count.
HAHAHAHAHAHAHAHAHAHAHA!!!!! Man, I crack myself up.
Time to start the weekend, boys and girls...
--Walt Weaver
Bozeman, Montana, USA
-----Original Message-----
From: Richard Ji [mailto:richard_at_letsplay.com]
Sent: Friday, December 15, 2000 2:53 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: Count(*) Vs Count(1)
Oracle has optimized the count(*) for performance.
Richard Ji
-----Original Message-----
From: root_at_fatcity.com [mailto:root_at_fatcity.com]On Behalf Of Sanjay Kumar
Sent: Friday, December 15, 2000 2:51 PM
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(*). Received on Fri Dec 15 2000 - 16:36:09 CST
![]() |
![]() |