Created
November 22, 2017 16:36
-
-
Save GuiMarthe/1aeca059df51b57a56c44aab415693d5 to your computer and use it in GitHub Desktop.
query for table sizes estimates in MB on oracle databases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Tables + Size MB | |
| select owner, table_name, round((num_rows*avg_row_len)/(1024*1024)) MB | |
| from all_tables | |
| where owner not like 'SYS%' -- Exclude system tables. | |
| and num_rows > 0 -- Ignore empty Tables. | |
| order by MB desc -- Biggest first. | |
| ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment