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: [Q] how to find how many row in each table in database?

Re: [Q] how to find how many row in each table in database?

From: Amit Aggarwal <amaggarwal_at_kendle.com>
Date: 1997/07/30
Message-ID: <33DF71CA.298@kendle.com>#1/1

Larry Leung wrote:
>
> Ari Kaplan wrote:
>
> >
> > What you should do is make a SQL script that creates another SQL script containing all tables.
> > Try the following:
> >
> > SET HEAD OFF
> > SET PAGESIZE 0
> > SET FEEDBACK OFF
> > SPOOL SCRIPT.SQL
> > SELECT 'select count(*) from '||OWNER||'.'||TABLE_NAME||';'
> > FROM ALL_TABLES
> > SPOOL OFF
>
> thanks for the solution. this is the kind of automated solution i
> wanted.
> but i just wonder is that possible not to really read thru every row
> of every table in order to find this out.
> like does oracle maintain a row count for each table in some system
> table.
>
> larry
>
> llarry_at_hkstar.com

analyze the tables and then see the column 'num_rows' in all_tables/dba_tables table.

amit

Oracle DBA/Unix SA Received on Wed Jul 30 1997 - 00:00:00 CDT

Original text of this message

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