ITPub博客

首页 > 大数据 > 数据挖掘 > db2大表统计

db2大表统计

原创 数据挖掘 作者:flywiththewind 时间:2018-09-27 17:01:21 0 删除 编辑

db2 "

select t1.*,nvl(substr(t2.DATAPARTITIONEXPRESSION,1,30),'NULL')  PARTITIONKEY from

(select trim(substr(t1.tabschema,1,20)) tabschema,substr(t1.tabname,1,30) tabname,

sum(DATA_OBJECT_L_SIZE +

INDEX_OBJECT_L_SIZE+

LONG_OBJECT_L_SIZE +

LOB_OBJECT_L_SIZE  +

XML_OBJECT_L_SIZE)  L_SIZE,

sum(DATA_OBJECT_P_SIZE +

INDEX_OBJECT_P_SIZE+

LONG_OBJECT_P_SIZE +

LOB_OBJECT_P_SIZE  +

XML_OBJECT_P_SIZE)  P_SIZE from sysibmadm.admintabinfo t1

group by trim(substr(t1.tabschema,1,20)),substr(t1.tabname,1,30) 

order by 3 desc,4 desc fetch first 30 rows only)t1

left join SYSIBM.SYSDATAPARTITIONEXPRESSION t2

on t1.TABSCHEMA=t2.TABSCHEMA

and t1.tabname=t2.tabname with ur"


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26224914/viewspace-2215064/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-08-30

  • 博文量
    140
  • 访问量
    160751