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

Home -> Community -> Usenet -> c.d.o.server -> count(rowid) vs count(*)

count(rowid) vs count(*)

From: Roger Jackson <rjackson_at_wire.net.au>
Date: Mon, 12 Jul 1999 19:54:07 +1000
Message-ID: <7mcemf$pl3$1@caley.wire.net.au>


Hi,

I was reading an article just recently which stipulated that you should not use count(*) to determine the number of rows in a table, but use count(1) or count(ROWID) instead. These options are faster because they bypass some unnecessary operations in Oracle's SQL processing mechanism.

Can somebody explain to me why this would be faster and what mechanisms are bypassed.

TIA Roger Received on Mon Jul 12 1999 - 04:54:07 CDT

Original text of this message

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