Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Count(*) Vs Count(1)

RE: Count(*) Vs Count(1)

From: Wolfe, Charles <charles.wolfe_at_digex.com>
Date: Fri, 15 Dec 2000 17:36:09 -0500
Message-Id: <10711.124761@fatcity.com>


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

Original text of this message

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