Actual size of tables for tablespaces
The size of a table can be found using oracle’s segment tables. Basically following code block returns a result of table size within related tablespaces in terms of MB and GB:
SELECT tablespace_name,
segment_name AS TABLENAME,
trunc((sum(BYTES) / 1024 / 1024), 2) MB,
trunc((sum(BYTES) / 1024 / 1024 / 1024), 2) GB
FROM user_segments
GROUP BY tablespace_name, segment_name
This way you may access only the tablespaces of logged in user
Tweet
Categories: Programming, SQL oracle, oracle table size, segment, SQL, table, table size, tablespace, user_segments
Thanks for dropping by! Feel free to join the discussion by leaving comments, and stay updated by subscribing to the

Recent Comments