Anasayfa / Database / informix / informix table sizeof disk

informix table sizeof disk

select     tn.partnum
         , tn.dbsname
         , (pt.nptotal * pt.pagesize) /1024 as total_kb
         , (pt.npused  * pt.pagesize) /1024 as used_kb
         , (pt.npused  * pt.pagesize) / 1024 /1024/1024 as used_gb
         , (pt.npdata  * pt.pagesize) /1024 as data_kb
         , tn.owner
         , tn.tabname
         , pt.lockid, pt.flags, pt.flags2
         , pt.rowsize, pt.ncols, pt.pagesize
         , dbinfo('utc_to_datetime',pt.created) as created
         , pt.nrows, pt.nptotal, pt.npused, pt.npdata
         , pt.nrows * pt.rowsize as tamanho_bytes
         , ((pt.nptotal - pt.npused) * pt.pagesize) /1024 as free_kb
         , pt.nextns as extents
         , pt.ninserts
         , pt.nupdates
         , pt.ndeletes
         , coalesce(pt.serialv,pt.cur_serial8,pt.cur_bigserial)::bigint serial
         , pta_oldvers
         , pta_newvers
    from sysmaster:sysptnhdr pt
    left join sysmaster:systabnames tn on tn.partnum = pt.partnum
    where dbsname =  'tablename' 
    order by used_kb desc

Kaynak:

https://stackoverflow.com/questions/54513704/how-to-get-a-list-of-tables-for-a-specific-database-when-connected-using-sysmast

 

Hakkında ibrahim

İlgili Makaleler

Informix lock user sesion list

SELECT s.username tutan_kullanici, s.sid tutan_session, t.username bekleyen_kullanici, t.sid bekleyen_session, l.type locktype, l.dbsname veritabani, l.tabname tablo, …

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir