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: determine num rows in a table without doing a count(*)

Re: determine num rows in a table without doing a count(*)

From: Jose Nicolau <jose.nicolau_at_clix.pt>
Date: Fri, 30 Mar 2001 22:52:45 -0500
Message-ID: <3AC5548D.916415B3@clix.pt>

if you don't like count(*), try count(1) or sum(3)/3 or 2*sum(0.5)...

"Daniel A. Morgan" wrote:

> > Is there a data dictionary table that holds a record of the number of rows
> > in a table.
> >
> > I need to determine the number of rows without doing a count(*).
>
> The number of rows in a table is accessible through the field num_rows in the
> views DBA_TABLES, ALL_TABLES, and USER_TABLES.
>
> But you must run analyze on the table or schema before the values are populated.
>
> But I am fascinated ... why can't you run SELECT COUNT(*)?
>
> Daniel A. Morgan
Received on Fri Mar 30 2001 - 21:52:45 CST

Original text of this message

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