欢迎来到思维库

思维库

GaussDB T分布式集群数据库每日维护必做必知

时间:2025-11-03 18:18:37 出处:数据库阅读(143)

GaussDB T分布式集群数据库每日维护必做必知
复制set line 300  set pages 2000  set timing off col tablespace_name for a25  col sum_GB for a15  col free_GB for a15  col use_precent for a15  select b.tablespace_name,分布         round(sum(b.bytes) / 1024 / 1024 / 1024, 0) sum_GB,         round(sum(nvl(a.bytes, 0)) / 1024 / 1024 / 1024, 0) free_GB,         round((sum(b.bytes) - sum(nvl(a.bytes, 0))) / sum(b.bytes), 4) * 100 use_precent,         count(*)    from (select tablespace_name, file_id, sum(bytes) bytes            from adm_free_space           groupby tablespace_name, file_id) a,         adm_data_files b   where a.file_id(+) = b.file_id     and a.tablespace_name(+) = b.tablespace_name   groupby b.tablespace_name  having round((sum(b.bytes) - sum(nvl(a.bytes, 0))) / sum(b.bytes), 4) * 100 >= 0   orderby 4 desc;  1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.

分享到:

温馨提示:以上内容和图片整理于网络,仅供参考,希望对您有帮助!如有侵权行为请联系删除!

友情链接: