count(1) **DOES NOT** count the first column. it does not matter whether
there are NULLS in the first column, count(1) AND count(*) return the
same result ... definitely in Oracle 9.2.0.7
-----Original Message-----
From: Joel
[mailto:oracledba-ezmlmshield-x70271549.[Email address protected]
Sent: Monday, July 02, 2007 1:35 PM
To: LazyDBA Discussion
Subject: RE: Diff Between Count( * ) and Count( 1 )
Count doesn't count nulls. Count(*) counts rows... I believe rowid, so
you will get a full table scan and a count of the rows. Count(1)
counts the first column, so if there are nulls they are not counted.
Joel Patterson
Database Administrator
joel.[Email address protected]
x72546
904 727-2546
Oracle LazyDBA home page