Home » RDBMS Server » Server Administration » no. of rows in all tables
no. of rows in all tables [message #159922] Wed, 22 February 2006 04:11 Go to next message
oracram
Messages: 17
Registered: February 2006
Junior Member
hi all,

Is there any view or table that gives the number of rows of all tables in a database? Or else how to know the number of rows of all tables?

Excuse if the question is silly..

All replies are welcome and tx in adv


Re: no. of rows in all tables [message #159926 is a reply to message #159922] Wed, 22 February 2006 04:24 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member


One solution could be ,

1. Collect statistics for the whole database

 SQL> exec dbms_stats.gather_database_stats;


2. Then run this query as sys user

 SQL> select sum(num_rows) from dba_tables;


Re: no. of rows in all tables [message #159950 is a reply to message #159926] Wed, 22 February 2006 06:03 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Just to add.
NUM_ROWS may not always give you the exact count.
The only reliable method is to manually count.
But why?
Previous Topic: ORA-03113: end-of-file on communication channel
Next Topic: deadlock deteced why?
Goto Forum:
  


Current Time: Fri Sep 20 14:23:09 CDT 2024