Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Difference between count(1) and count(*)
230297 rows in every case
Row Count using all columns Elapsed: 00:00:02.06 Row Count using a specific numbered column Elapsed: 00:00:02.06 Row Count using the pseudo-column rownum Elapsed: 00:00:02.08 Row Count using the ROWID column Elapsed: 00:00:02.07 Counting a Not-NULL column Elapsed: 00:00:02.07 Counting a NULL column Elapsed: 00:00:02.06
Doesn't look like a lot of difference to me but maybe the sample is small.
"Peter Miller" <Peter.Miller To: <oracle-l_at_freelists.org> @cogent-dsn.com> cc: Sent by: Subject: RE: Difference between count(1) and count(*) oracle-l-bounce 07/08/2004 09:40 AM Please respond to oracle-l
1,749,951 rows returned in every case
count(rowid) - approx 3.2 secs count(obj#) - approx 3.5 secs count(1) - approx 3.6 secs count(*) - approx 3.6 secs count(rownum)- approx 4.6 secs count(source)- approx 8.6 secsPlease see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
![]() |
![]() |