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: Index to speed up "select count(*) from" queries...

Re: Index to speed up "select count(*) from" queries...

From: Doug Cowles <dcowles_at_bigfoot.com>
Date: Wed, 19 May 1999 18:49:38 -0400
Message-ID: <37434001.479D20F6@bigfoot.com>


I second that, why is count(rowid) nonsense? I was going to suggest count(1). From my understanding a count(*) reads in the entire row when counting
and a count(1) or count(rowid) only reads the rowid. Should be much faster..
Why not try that?

Eric wrote:

> Dante, just curious, why is that nonsense?
>
> I thought count(rowid) was much faster than count(*)?
>
> Thanks
>
> On Mon, 17 May 1999, Dante wrote:
>
> > Tim,
> > sorry ... forget my reply ... that is nonsense ...
> >
> > Are you using single table columns or joins ? Could
> > you provide the query ?
> >
> > Regards
> > Dante
> >
> > In article <7hopbe$5oo$1_at_nnrp1.deja.com>,
> > Dante <dnotari_at_my-dejanews.com> wrote:
> > > Tim,
> > > do a count(ROWID)
> > >
> > > Regards
> > > Dante
> > >
> > > In article <7hop3v$5me$1_at_nnrp1.deja.com>,
> > > tim_mcconechy_at_my-dejanews.com wrote:
> > > > My application needs to do some count(*) queries...
> > > >
> > > > Is there some kind of index I can use to speed this query..
> > > >
> > > > On a table with 100000 records it takes a couple seconds longer
> > than I
> > > > would like...
> > > >
> > > > --== Sent via Deja.com http://www.deja.com/ ==--
> > > > ---Share what you know. Learn what you don't.---
> > > >
> > >
> > > --== Sent via Deja.com http://www.deja.com/ ==--
> > > ---Share what you know. Learn what you don't.---
> > >
> >
> >
> > --== Sent via Deja.com http://www.deja.com/ ==--
> > ---Share what you know. Learn what you don't.---
> >
> >
Received on Wed May 19 1999 - 17:49:38 CDT

Original text of this message

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