查询表空间利用率
程序员文章站
2022-06-14 09:45:11
查询表空间利用率: select a.tablespace_name, total, free, total-free as used, substr(free/total * 100, 1, 5) as "FREE%", substr((total - free)/total * 100, 1, ......
查询表空间利用率:
select a.tablespace_name, total, free, total-free as used, substr(free/total * 100, 1, 5) as "free%",
substr((total - free)/total * 100, 1, 5) as "used%" from
(select tablespace_name, case when t.autoextensible='yes' then sum(maxbytes)/1024/1024 else
sum(bytes)/1024/1024 end as total from dba_data_files t group by tablespace_name,autoextensible) a,
(select tablespace_name, sum(bytes)/1024/1024 as free from dba_free_space group by tablespace_name) b
where a.tablespace_name = b.tablespace_name order by a.tablespace_name
查询结果
上一篇: Linux环境Kafka安装配置
下一篇: 操作mysql第一次访问速度慢(远程)