|
Re: Calculate the actual size (in MB and KB) of a table and index - SQL scipts? [message #60520 is a reply to message #60516] |
Thu, 12 February 2004 01:42 |
Thiru
Messages: 1089 Registered: May 2002
|
Senior Member |
|
|
Patrick,
you can get the size from dba/all/user_tables after analyzing the concerned tables/schema ..
something like this..
thiru@9.2.0:SQL>select table_name,round(blocks*blk_size/1024) "size(K)",round(blocks*blk_size/1024/1024,2) "size(M)"
2 from dba_tables,(select value blk_size from v$parameter where name='db_block_size')
3 where owner='THIRU';
TABLE_NAME size(K) size(M)
------------------------------ ---------- ----------
B 0 0
BIG_EMPTY 0 0
CHILD 0 0
EMP 16 .02
EMP2 16 .02
EMPT 16 .02
ERRORS 412 .4
......
....
-Thiru
|
|
|
Re: Calculate the actual size (in MB and KB) of a table and index - SQL scipts? [message #60521 is a reply to message #60520] |
Thu, 12 February 2004 02:19 |
Patrick Tahiri
Messages: 119 Registered: January 2004
|
Senior Member |
|
|
Hi Thiru,
Thank you for the SQL script but I receive no rows back from the query? Strange...
SELECT dbat.table_name
,round(dbat.blocks*v_param.blk_size/1024) "size(K)"
,round(dbat.blocks*v_param.blk_size/1024/1024,2) "size(M)"
FROM dba_tables dbat
,(select value blk_size from v$parameter where name='db_block_size') v_param
WHERE table_name = 'log_incoming';
-- ALL THE TABLES: dbat.owner='sms_user';
Thank you for your help!
Regards,
Patrick Tahiri.
|
|
|
|
|
|