Posted By

geekzspot on 01/24/13


Tagged

DBA


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

geekzspot
bcmoney


Oracle Table Sizes


 / Published in: SQL
 

Get the size of all Tables in your Database Schema

Run DB Stats for more accuracy!

  1. -- List Tables in order of size, biggest first.
  2. SELECT owner
  3. , table_name
  4. , ROUND(num_rows*avg_row_len) AS bytes
  5. FROM all_tables
  6. WHERE owner NOT LIKE 'SYS%' -- Exclude system tables.
  7. AND num_rows > 0 -- Ignore empty Tables.
  8. ORDER BY bytes DESC -- Biggest first.
  9. ;

Report this snippet  

You need to login to post a comment.