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: Finding total Rows without count() ?

Re: Finding total Rows without count() ?

From: Gary Perkins <garyp_at_bgm.com.au>
Date: Wed, 15 Dec 1999 15:32:03 +0800
Message-ID: <3857439f.0@news.highway1.com.au>


Your right this would be slower if you ran analyze every time you wanted a row count but for ball park figures it fine as at my site I run analyze regularly as a batch job.

Paul Bennett <bennett_at_cc.gatech.edu> wrote in message news:385731C4.45C05BC1_at_cc.gatech.edu...
> How can this be faster than count(*)?
>
> John Chiu wrote:
>
> > (1) analyze table compute statistics
> > (2) select num_rows from user_tables where table_name =
'your_table_name';
> >
> > HTH
> >
> > John Chiu
> >
> > Ken Sproule <kenmn_at_tds.net> wrote in message
> > news:4trd5ssdlmn576ltqu3c6fsnln3qlufgob_at_4ax.com...
> > > As always, thanks in advance for your help.
> > >
> > > I need a fast way to determine the total number of rows in a table. I
> > > assume somewhere Oracle stores such information about its tables.
> > > Where is it?
> > >
> > > The count() type syntaxes take much too long on tables of say 3+
> > > million rows, so I'm looking for a fast way to accomplish it.
> > >
> > > Post answers to the group, as others might be interested also.
> > >
> > > Thanks,
> > >
> > > Ken Sproule
> > > kenmn_at_tds.net
> > >
> > >
>
Received on Wed Dec 15 1999 - 01:32:03 CST

Original text of this message

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