February 10, 2025

How to check the size of an Oracle Table

 Check the size of a table in Oracle


set pages 300
set line 200
col "SEGMENT_NAME" format a 30
col "Size in GB" format a20

 

SELECT SEGMENT_NAME, SUM(BYTES)/1024/1024/1024 as "Size in GB" FROM dba_segments WHERE SEGMENT_TYPE='TABLE' and owner='&Owner' and segment_name in ('&Table_Name') group by SEGMENT_NAME order by SEGMENT_NAME;


Sample Output:

SEGMENT_NAME         Size in GB
-------------------- ----------
UNDO$                0.265



No comments:

Post a Comment

If you have any queries/ any suggestion please do comment and let me know.

Recent Post

Check progress on expdp and impdp

 Check progress on expdp and impdp: In few cases we need to monitor the progress of an export or import job in oracle. below are the steps c...