• 表空间统计


    方法1:

    select ff.s tablespace_name,

    ff.b total,

    (ff.b - fr.b) usage,

    fr.b free,

    round((ff.b - fr.b) / ff.b * 100) || '% ' usagep

    from (select tablespace_name s, sum(bytes) / 1024 / 1024 b

    from dba_data_files

    group by tablespace_name) ff,

    (select tablespace_name s, sum(bytes) / 1024 / 1024 b

    from dba_free_space

    group by tablespace_name) fr

    where ff.s = fr.s

    方法2:

    select a.owner,a.segment_name,segment_type,sum(bytes)/1024 as SizeM From dba_segments a

    inner join (

    select owner,segment_name from dba_lobs where table_name ='XI_AF_MSG' union all

    select owner,index_name as segment_name from dba_indexes where table_name ='XI_AF_MSG' union all

    select owner,segment_name from dba_segments where segment_name='XI_AF_MSG'

    ) b on a.owner=b.owner and a.segment_name=b.segment_name

    group by a.owner,a.segment_name,segment_type

    order by a.segment_name

  • 相关阅读:
    使用ab进行页面的压力测试
    apache http server2.2 + tomcat5.5 性能调优
    php Try Catch多层级异常测试
    用flask实现的添加后保留原url搜索条件
    会议室预定设计
    day4
    day3
    day2
    day1
    redis介绍以及安装
  • 原文地址:https://www.cnblogs.com/byfhd/p/1495848.html
Copyright © 2020-2023  润新知