Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Table and schema current size.
accept o prompt 'What is the schema onwer you wish to examine? '
set head off
set verify off
spool analyze.sql
select 'analyze table '||table_name||' compute statistics;' from dba_tables
where owner = upper('&&o');
spool off
@analyze.sql
spool table_size.out
select table_name,num_rows*avg_row_len from dba_tables where
owner=upper('&&o');
spool off
spool schema_size.out
select owner,sum(num_rows*avg_row_len) from dba_tables group by owner;
spool off
HTH, Steve
"Peter Shvets" <pshvets_at_powermarket.com> wrote in message
news:9hamoe$1rlg$1_at_news.mainstreet.net...
> Hello, dear friends.
> I need to find out how big is every single table in the schema I have as
> well as the size of the schema itself.
> I am not a DBA, so I apologize for too simple question. :)
>
> Thanks in advance.
>
> Peter Shvets.
>
>
Received on Tue Jun 26 2001 - 20:49:32 CDT