模糊查询SSD_DATA盘谁使用率高?

select sum(bytes / 1024 / 1024 / 1024),
       d.owner,
       d.segment_name,
       d.segment_type
  from dba_segments d
 where d.owner in
       (select c.username
          from dba_users c
         where c.default_tablespace in
               (select distinct a.TABLESPACE_NAME
                  from dba_data_files a
                 where file_name like '+SSD_DATA%')
           and c.account_status = 'OPEN'
           and c.default_tablespace not in ('USERS', 'SYSAUX', 'SYSTEM')
           and c.username not in ('OGG', 'QUERY'))
 group by d.owner, d.segment_name, d.segment_type
 order by 1 desc

posted @ 2018-03-19 13:59  钱若梨花落  阅读(176)  评论(0编辑  收藏  举报