Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why aren't these queries the same?
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
![]() |
![]() |