Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: count(*)
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C03F75.FEC29564
Content-Type: text/plain;
charset="iso-8859-1"
Thanks, Steve and Henry. You confirmed my thoughts.
I may have serious problems, but they don't include Oracle 6... !
GO VIKINGS!
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."
-----Original Message-----
From: Steve Orr [mailto:sorr_at_arzoo.com]
Sent: Thursday, October 26, 2000 1:01 PM
To: Multiple recipients of list ORACLE-L
Subject: 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-----
Sent: Thursday, October 26, 2000 9:27 AM
To: Multiple recipients of list ORACLE-L
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 Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-LReceived on Thu Oct 26 2000 - 12:55:54 CDT
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Steve Orr INET: sorr_at_arzoo.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: 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). ------_=_NextPart_001_01C03F75.FEC29564 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2650.12"> <TITLE>RE: count(*)</TITLE> </HEAD> <BODY> <P><FONT SIZE=3D2>Thanks, Steve and Henry. You confirmed my = thoughts.</FONT> </P> <P><FONT SIZE=3D2>I may have serious problems, but they don't include = Oracle 6... !</FONT> </P> <P><FONT SIZE=3D2>GO VIKINGS!</FONT> </P> <P><FONT SIZE=3D2>Lisa Rutland Koivu</FONT> <BR><FONT SIZE=3D2>Oracle Database Administrator</FONT> <BR><FONT SIZE=3D2>Qode.com</FONT> <BR><FONT SIZE=3D2>4850 North State Road 7</FONT> <BR><FONT SIZE=3D2>Suite G104</FONT> <BR><FONT SIZE=3D2>Fort Lauderdale, FL 33319</FONT> </P> <P><FONT SIZE=3D2>V: 954.484.3191, x174</FONT> <BR><FONT SIZE=3D2>F: 954.484.2933 </FONT> <BR><FONT SIZE=3D2>C: 954.658.5849</FONT> <BR><FONT SIZE=3D2><A HREF=3D"http://www.qode.com" = TARGET=3D"_blank">http://www.qode.com</A></FONT> </P> <P><FONT SIZE=3D2>"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."</FONT></P> <BR> <P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>From: Steve Orr [<A = HREF=3D"mailto:sorr_at_arzoo.com">mailto:sorr_at_arzoo.com</A>]</FONT> <BR><FONT SIZE=3D2>Sent: Thursday, October 26, 2000 1:01 PM</FONT> <BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT> <BR><FONT SIZE=3D2>Subject: RE: count(*)</FONT> </P> <BR> <P><FONT SIZE=3D2>I think it depends on your version of Oracle. It used = to make a difference</FONT> <BR><FONT SIZE=3D2>and the "secret" tuning tidbit was not to = use count(*). Since then Oracle</FONT> <BR><FONT SIZE=3D2>has optimized count(*). Now I think it's OK as long = as you're not using</FONT> <BR><FONT SIZE=3D2>version 6. (Does anyone know which specific release = addressed this? Maybe as</FONT> <BR><FONT SIZE=3D2>late as 7.1?) If you're still using version 6 then = you probably have other,</FONT> <BR><FONT SIZE=3D2>more serious problems.</FONT> </P> <P><FONT SIZE=3D2>Steve Orr</FONT> </P> <BR> <BR> <P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>Sent: Thursday, October 26, 2000 9:27 AM</FONT> <BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT> </P> <BR> <P><FONT SIZE=3D2>Lisa,</FONT> <BR><FONT SIZE=3D2>I don't see why there would be a difference either. = Also, autotrace gives</FONT> <BR><FONT SIZE=3D2>the same execution plan and statistics for = both.</FONT> </P> <P><FONT SIZE=3D2>Henry</FONT> </P> <P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>Sent: Thursday, October 26, 2000 11:16 AM</FONT> <BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT> </P> <BR> <BR> <P><FONT SIZE=3D2>good morning -</FONT> </P> <P><FONT SIZE=3D2>What query uses less resources:</FONT> </P> <P><FONT SIZE=3D2>select count(*) from table;</FONT> </P> <P><FONT SIZE=3D2>or</FONT> </P> <P><FONT SIZE=3D2>select count('x') from table;</FONT> </P> <P><FONT SIZE=3D2>I don't think there is a difference, the plans are = the same, and both are</FONT> <BR><FONT SIZE=3D2>not column specific.</FONT> <BR><FONT SIZE=3D2>Comments anyone?</FONT> </P> <P><FONT SIZE=3D2>Thanks</FONT> </P> <P><FONT SIZE=3D2>Lisa Rutland Koivu</FONT> <BR><FONT SIZE=3D2>Oracle Database Administrator</FONT> <BR><FONT SIZE=3D2>Qode.com</FONT> <BR><FONT SIZE=3D2>4850 North State Road 7</FONT> <BR><FONT SIZE=3D2>Suite G104</FONT> <BR><FONT SIZE=3D2>Fort Lauderdale, FL 33319</FONT> </P> <P><FONT SIZE=3D2>V: 954.484.3191, x174</FONT> <BR><FONT SIZE=3D2>F: 954.484.2933</FONT> <BR><FONT SIZE=3D2>C: 954.658.5849</FONT> <BR><FONT SIZE=3D2><A HREF=3D"http://www.qode.com" = TARGET=3D"_blank">http://www.qode.com</A> <<A = HREF=3D"http://www.qode.com" = TARGET=3D"_blank">http://www.qode.com</A>></FONT> </P> <P><FONT SIZE=3D2>"The information contained herein does not = express the opinion or position</FONT> <BR><FONT SIZE=3D2>of Qode.com and cannot be attributed to or made = binding upon Qode.com."</FONT> </P> <P><FONT SIZE=3D2>--</FONT> <BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A = HREF=3D"http://www.orafaq.com" = TARGET=3D"_blank">http://www.orafaq.com</A></FONT> <BR><FONT SIZE=3D2>--</FONT> <BR><FONT SIZE=3D2>Author: Henry Poras</FONT> <BR><FONT SIZE=3D2> INET: Henry.Poras_at_ctp.com</FONT> </P> <P><FONT SIZE=3D2>Fat City Network Services -- (858) = 538-5051 FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, = California -- Public Internet = access / Mailing Lists</FONT> <BR><FONT = SIZE=3D2>---------------------------------------------------------------= -----</FONT> <BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT> <BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = 'ListGuru') and in</FONT> <BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB = ORACLE-L</FONT> <BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed = from). You may</FONT> <BR><FONT SIZE=3D2>also send the HELP command for other information =
(like subscribing).</FONT>
</P> <P><FONT SIZE=3D2>-- </FONT> <BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A = HREF=3D"http://www.orafaq.com" = TARGET=3D"_blank">http://www.orafaq.com</A></FONT> <BR><FONT SIZE=3D2>-- </FONT> <BR><FONT SIZE=3D2>Author: Steve Orr</FONT> <BR><FONT SIZE=3D2> INET: sorr_at_arzoo.com</FONT> </P> <P><FONT SIZE=3D2>Fat City Network Services -- (858) = 538-5051 FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, = California -- Public Internet = access / Mailing Lists</FONT> <BR><FONT = SIZE=3D2>---------------------------------------------------------------= -----</FONT> <BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT> <BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = 'ListGuru') and in</FONT> <BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB =
![]() |
![]() |