Hi, run this query. It will show tablespace, total mb, free mb, free % and largest segment size. Largest segment size will indicate how fragmented your tablespace is and how big the largest available chunk of space is.
SELECT a.tablespace_name tablespace,
ROUND(SUM(a.total1)/1024/1024, 1) "Total Mb",
ROUND(SUM(a.total1)/1024/1024, 1)-ROUND(SUM(a.sum1)/1024/1024, 1) "Used Mb",
ROUND(SUM(a.sum1)/1024/1024, 1) "Free Mb",
ROUND(SUM(a.sum1)/1024/1024,1)*100/ROUND(SUM(a.total1)/1024/1024,1) "Free %",
ROUND(SUM(a.maxb)/1024/1024, 1) "Largest Segment Size Mb"
FROM (SELECT tablespace_name,
0 total1,
SUM(bytes) sum1,
MAX(bytes) maxb,
COUNT(bytes) cnt
FROM dba_free_space
GROUP BY tablespace_name
UNION
SELECT tablespace_name,
SUM(bytes) total1,
0,
0,
0
FROM dba_data_files
GROUP BY tablespace_name) a
GROUP BY a.tablespace_name;
Bookmarks