Bootstrap FreeKB - Oracle Database - Determine Table Size
Oracle Database - Determine Table Size

Updated:   |  Oracle Database articles

The following query can be used to list the size of the tables in the FOO tablespace.

SELECT
    DS.TABLESPACE_NAME, SEGMENT_NAME, ROUND(SUM(DS.BYTES) / (1024)) 
AS
    KB
FROM
    DBA_SEGMENTS DS
WHERE
    SEGMENT_NAME IN (SELECT TABLE_NAME FROM ALL_TABLES WHERE TABLESPACE_NAME = 'FOO')
GROUP BY
    DS.TABLESPACE_NAME, SEGMENT_NAME
ORDER BY
    KB DESC;

 

Something like this should be returned.

SEGMENT_NAME   KB
-----------------------
TABLE001       15498432
TABLE002        2075840
TABLE003         909504
TABLE004         793728
TABLE005         270528

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 8003a6 in the box below so that we can be sure you are a human.