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: Table and schema current size.

Re: Table and schema current size.

From: TickleKing <letonego_at_hotmail.com>
Date: Wed, 27 Jun 2001 01:49:32 GMT
Message-ID: <MYa_6.66462$V5.9035076@typhoon.columbus.rr.com>

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

Original text of this message

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