查询数据库大于1G的表

select a.owner, a.table_name, tt.total, a.partitioned
  from dba_tables a,
       (select t.owner,
               t.segment_name,
               trunc(sum(t.bytes) / 1024 / 1024 / 1024) as total
          from dba_segments t
         where t.segment_type like 'TABLE%'
         group by t.owner, t.segment_name
        having sum(t.bytes) / 1024 / 1024 > 1024) tt
 where a.owner = tt.owner
   and a.table_name = tt.segment_name;
posted @ 2013-05-13 16:48  lishoubin  阅读(245)  评论(0编辑  收藏  举报