Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: count(*)
I think it depends on your version of Oracle. It used to make a difference
and the "secret" tuning tidbit was not to use count(*). Since then Oracle
has optimized count(*). Now I think it's OK as long as you're not using
version 6. (Does anyone know which specific release addressed this? Maybe as
late as 7.1?) If you're still using version 6 then you probably have other,
more serious problems.
Steve Orr
-----Original Message-----
From: root_at_fatcity.com [mailto:root_at_fatcity.com]On Behalf Of Henry Poras
Sent: Thursday, October 26, 2000 9:27 AM
To: Multiple recipients of list ORACLE-L
Subject: RE: count(*)
Lisa,
I don't see why there would be a difference either. Also, autotrace gives
the same execution plan and statistics for both.
Henry
-----Original Message-----
Sent: Thursday, October 26, 2000 11:16 AM
To: Multiple recipients of list ORACLE-L
good morning -
What query uses less resources:
select count(*) from table;
or
select count('x') from table;
I don't think there is a difference, the plans are the same, and both are
not column specific.
Comments anyone?
Thanks
Lisa Rutland Koivu
Oracle Database Administrator
Qode.com
4850 North State Road 7
Suite G104
Fort Lauderdale, FL 33319
V: 954.484.3191, x174 F: 954.484.2933 C: 954.658.5849
"The information contained herein does not express the opinion or position of Qode.com and cannot be attributed to or made binding upon Qode.com."
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Henry Poras
INET: Henry.Poras_at_ctp.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Oct 26 2000 - 10:54:26 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
![]() |
![]() |