oracle 817 on Sun0S 5.8.
select (*) was faster. Unles you have timings to back it up. I realy do not
see the differences. Probably an oracle legend about which is faster.
see my supporting data below:
aj
SQL*Plus: Release 8.1.7.0.0 - Production on Wed Jun 2 14:59:13 2004
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.0.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.0.0 - 64bit Production
SQL> set timing on
SQL> select count(*) from auction2;
COUNT(*)
----------
9934
Elapsed: 00:00:01.03
SQL> select count(1) from auction2;
COUNT(1)
----------
9934
Elapsed: 00:00:01.83
SQL> select count(auction_id) from auction2;
COUNT(AUCTION_ID)
-----------------
9934
Elapsed: 00:00:04.96
SQL>
-----Original Message-----
From: Cowen Jeffrey
[mailto:oracledba-ezmlmshield-x59136574.[Email address protected]
Sent: Wednesday, June 02, 2004 10:47 AM
To: LazyDBA.com Discussion
Subject: RE: Just out of curiosity
Oh not this again.....................
-----Original Message-----
From: Somasekhar Bangalore
[mailto:oracledba-ezmlmshield-x99530394.[Email address protected]
Sent: Wednesday, June 02, 2004 8:49 AM
To: LazyDBA.com Discussion
Subject: RE: Just out of curiosity
Of course , it matters,
select count(*) ---it takes all the columns into account.
select count(1) ---this one takes the first column..
also select count(1) is faster compared to the count(*).
regards
som
-----Original Message-----
From: Edwin Uy
[mailto:oracledba-ezmlmshield-x93770188.[Email address protected]
Sent: Wednesday, June 02, 2004 4:35 PM
To: LazyDBA.com Discussion
Subject: Just out of curiosity
Hi all,
select count(*) or select count(1) . does it really matter . ???
Cheers,
EDWIN ONG UY
\\|//
(o o)
^"^"^"^"^"^oOOo"^(_)^"oOOo^"^"^"^"^"^"^"^"^"^"^
"Choose a job you love, and you will never have to work a day in your
life." --Confucius
"How do I work? I grope." -- Albert Einstein
"Experience is the best teacher, enrolling in the class is the biggest
problem." -- Anonymous
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: send a blank email to oracledba-[Email address protected]
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: send a blank email to oracledba-[Email address protected]
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: send a blank email to oracledba-[Email address protected]
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page