Query the size of the table and the lock mode

 select st.dbsname databasename,st.tabname,max(dt.locklevel) lock_level,sum(ti_nextns) extents, 

 sum(sin.ti_nrows) nrows,max(sin.ti_pagesize) pagesize, sum(sin.ti_nptotal) nptotal,  round(sum(sin.ti_nptotal*sd.pagesize/1024/1024),2)  total_size,

 sum(sin.ti_npused) npused,round(sum(sin.ti_npused*sd.pagesize/1024/1024),2) used_size

 from sysmaster:systabnames st, sysmaster:sysdbspaces sd,sysmaster:systabinfo sin,scp20:systables dt

 where sd.dbsnum = trunc(st.partnum/1048576) and dt.tabid>99 and dt.tabname=st.tabname and st.partnum=sin.ti_partnum and st.dbsname='scp20'

 group by 1,2

 order by  9 desc;

 

databasename  swms 
tabname       lap30
lock_level    R
extents       22 
nrows         909406
pagesize      16384
nptotal       98304
total_size    1536.00
npused        93605
used_size     1462.58

Guess you like

Origin blog.csdn.net/David_ifx/article/details/114832757