Re: Oracle10g, Need to find number of rows in each table in a schema

From: RA <angani_at_gmail.com>
Date: 3 Nov 2006 16:04:59 -0800
Message-ID: <1162598699.771360.317470_at_h48g2000cwc.googlegroups.com>


>
> SELECT table_name, num_rows
> FROM all_tables
> WHERE owner = <some_value>;
>
> won't work for what reason?

[Quoted] Hi Mogan,

[Quoted] I am sorry to say, your query will not give you the right count.

Steps to follow is
1) analyze the tables
[Quoted] 2) SELECT table_name, num_rows FROM all_tables WHERE owner = <some_value>

But my question is why even bother to analyze.

There should be better sql to write this, All I can think is INDEX table should be joined to get the correct count. I don't have the answer yet will let you know, when i have it.

RA Received on Sat Nov 04 2006 - 01:04:59 CET

Original text of this message