Message-Id: <10661.120325@fatcity.com> From: Glenn Travis Date: Thu, 26 Oct 2000 15:05:36 -0400 Subject: RE: count(*) What if 'x' is the lead column in an index on that table? What if the table was 4000 bytes per row, and the index was 20 bytes per row? Wouldn't it therefore be faster (less io) to scan the index for rowcount? Why wouldn't you ALWAYS scan the index for count(*)? Seems more efficient, nes pas? > -----Original Message----- > From: root@fatcity.com [mailto:root@fatcity.com]On Behalf Of Henry Poras > Sent: Thursday, October 26, 2000 12:27 PM > 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 > http://www.qode.com > > "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@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@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).