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 -> Re: Why aren't these queries the same?

Re: Why aren't these queries the same?

From: Marc Blum <marc_at_marcblum.de>
Date: Sat, 09 Mar 2002 11:04:44 GMT
Message-ID: <3c89ec26.10589506@news.online.de>


On Fri, 08 Mar 2002 23:05:45 GMT, damorgan <damorgan_at_exesolutions.com> wrote:

>As long as you are looking to speed things up ... try replaeing count(*) with
>count(1) or count(rowid).
>

Sure?

SQL> select count(*) from source$;

  COUNT(*)


     38694

Elapsed: 00:00:01.12
SQL> select count(1) from source$;

  COUNT(1)


     38694

Elapsed: 00:00:01.22
SQL> select count(*) from source$;

  COUNT(*)


     38694

Elapsed: 00:00:01.01
SQL> select count(1) from source$;

  COUNT(1)


     38694

Elapsed: 00:00:01.31

regards
Marc Blum
mailto:marc_at_marcblum.de
http://www.marcblum.de Received on Sat Mar 09 2002 - 05:04:44 CST

Original text of this message

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