Thursday, 6 February 2014

oracle table size in mb

https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:266215435203
SELECT
   owner, table_name, TRUNC(sum(bytes)/1024/1024) Meg
FROM 
(SELECT segment_name table_name, owner, bytes
 FROM dba_segments
 WHERE segment_type = 'TABLE' and owner = 'AP' )
 group by table_name, owner
 order by 3 desc 
 
 
 select TABLE_NAME, ROUND((AVG_ROW_LEN * NUM_ROWS / 1024), 2) ROW_SIZE_KB, (BLOCKS * 8)  BLOCK_SIZE_KB  
from all_TABLES where  owner = 'AP'
order by TABLE_NAME

No comments:

Post a Comment