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: Peter L <news_at_abc.co.uk>
Date: 2000/06/20
Message-ID: <394f1a8e.2811197@news.freeserve.net>#1/1

On Mon, 19 Jun 2000 20:01:20 GMT, EnderW <ender29_at_my-deja.com> 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.
>
>

Thomas Kyte posted something a while ago about why you shouldn't do a count(*). Something to do with increased i/o as far as I remember. You may be able to find the message on deja. Received on Tue Jun 20 2000 - 00:00:00 CDT

Original text of this message

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