The average for count(id) was: 98.804
The average for count(*) was: 101.22
If you look in QA they actualy run the same exact execution. count(*)
exectued on object ref_id_idx which is the colum I used in the
count(id). So atleast in my example count(id) and count(*) are the
same exact thing.
Adam
----- Original Message -----
From: Raster, Tim <[EMAIL PROTECTED]>
Date: Tue, 13 Jul 2004 13:31:48 -0500
Subject: RE: Faster count?
To: SQL <[EMAIL PROTECTED]>
Actually, I think count(*) is faster. It is a special signal to the
server that it doesn't have to count field values, but rows, which saves
time having to evaluate rows. Unlike select *, it does NOT mean all
fields... it means all rows. So count(*) is faster.
-----Original Message-----
From: Adam Haskell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 13, 2004 13:28
To: SQL
Subject: Re: Faster count?
no...its slower. Always count an indexed column if possible.
----- Original Message -----
From: Michael Dinowitz <[EMAIL PROTECTED]>
Date: Tue, 13 Jul 2004 14:24:59 -0400
Subject: Faster count?
To: SQL <[EMAIL PROTECTED]>
Is count (*) faster than count(specific_field)?
Thanks
--
Michael Dinowitz
http://www.houseoffusion.com
For all your ColdFusion needs________________________________
________________________________________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
