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

Oracle Memory usage Queries

Some Important Oracle database Memory management queries. SGA usage by Oracle Instance: select  round(sum(bytes)/1024/1024,2)||' MB'...