博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
查看GP空间
阅读量:4212 次
发布时间:2019-05-26

本文共 441 字,大约阅读时间需要 1 分钟。

select table_schema,table_name,sz,

cast (
cast(substring(sz,1,length(sz)-3) as decimal(18,2))*
(
case when sz like '%k%' then power(10,-13)
when sz like '%M%' then power(10,0)
when sz like '%G%' then power(10,3)
end
) as decimal(18,2)) as sz_MB
from 
(
select 
table_schema,table_name,pg_size_pretty(pg_total_relation_size(table_schema||'.'||table_name)) as sz 
from information_schema.tables
where table_schema='ads'
) as a 
order by sz_MB desc 
 

转载地址:http://epfmi.baihongyu.com/

你可能感兴趣的文章
《redis in action》ZSet相关命令
查看>>
《redis in action》redis发布订阅
查看>>
《redis in action》sort排序命令
查看>>
《redis in action》redis事务
查看>>
《redis in action》key的自动过期
查看>>
《redis in action》redis持久化简介
查看>>
Oracle RAC Failover 详解
查看>>
批处理 自动修改 IP 地址
查看>>
Oracle RAC LoadBalance
查看>>
v$sql,v$sqlarea,v$sqltext 和 v$sql_plan 说明
查看>>
ORA-31623 When Submitting a Datapump Job [ID 308388.1]
查看>>
Oracle SYSAUX 表空间 说明
查看>>
RAC 安装patch 后启动实例 报错 ORA-00439 feature not enabled- Real Application Clusters 解决方法
查看>>
On RAC, expdp Removes the Service Name [ID 1269319.1]
查看>>
Important Changes to Oracle Database Patch Sets Starting With 11.2.0.2 [ID 1189783.1]
查看>>
Oracle alert log ALTER SYSTEM SET service_names='','SYS$SYS.KUPC$C_...' SCOPE=MEMORY SID='' 说明
查看>>
Oracle latch:library cache 导致 数据库挂起 故障
查看>>
Openfiler 配置 NFS 示例
查看>>
Oracle 11.2.0.1 RAC GRID 无法启动 : Oracle High Availability Services startup failed
查看>>
Oracle 18c 单实例安装手册 详细截图版
查看>>