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: Age old question.. count(*), count(id) or count(1) faster ?

Re: Age old question.. count(*), count(id) or count(1) faster ?

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: 2000/06/20
Message-ID: <394F561E.4D41@yahoo.com>#1/1

EnderW wrote:
>
> Hi,
> No flames.. Have a quick question. I thought this matter be settled
> but it came up again. Is select count(*) from table faster than select
> count(id) from table or select count(1) from table faster ? I think all
> should be equal. ( id is an indexed column by itself in table). I did
> an explain plan and it came up same for those cases. Or is it not ? am
> I missing something ? Thnkx in adv.
>
> --
> Ender Wiggin
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

I think you'll find that all are equivalent. The optimiser in Oracle has improved on this issue, including the ability to do a fast index scan.

HTH

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk

We are born naked, wet and hungry...then things get worse
Received on Tue Jun 20 2000 - 00:00:00 CDT

Original text of this message

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