Using this SQL you will be able to get a list of the top 15 biggest tables in MB and GB.
You can replace the 15 with any number depending on how many results you would like to see.
SQL:
SELECT NAME, size_mb, size_gb
FROM (SELECT segment_name NAME,
SUM (BYTES) / 1024 / 1024 size_mb,
SUM (BYTES) / 1024 / 1024 / 1024 size_gb
FROM dba_segments
GROUP BY segment_name
ORDER BY SUM (BYTES) / 1024 / 1024 DESC)
WHERE ROWNUM <= 15
Very useful code! I will try to use it in and see the biggest tables in my database.
ReplyDeleteSql training