Anomaly: How are pages allocated?
Posted in 2004
I'm using On-Line 7.31.UC6. Am trying to reclaim unused space from a
DB and to do this I'm trying to understand the Sysmaster DB.
I'm going to unload a very big table (t_invoices_ar ~ 17M rows used,
50M deleted by me), drop it, rebuild it, and then reload it. To test
my scripts I created a table, t_invoices_ar_temp, and then ran the
scripts on that using a 200 row subset of the big table. Everything
looks good.
About an hour later, doing some investigating, I used this script:
select tabname,ti_nptotal,ti_npused,ti_npdata,ti_nrows,ti_rowsize
from systabnames, systabinfo
where partnum = ti_partnum
and dbsname = 'hutrep_eom'
and tabname like 't\\_%';
And got this output:
tabname ti_nptotal ti_npused ti_npdata ti_nrows ti_rowsize
t_invoices_ar 3623517 3623517 550193 17606143 59
t_invoices_ar_dia 8 1 0 0 31
t_invoices_ar_vio 8 1 0 0 72
t_oone_calltype 8 5 4 62 120
t_invoices_ar_temp 136563 17 7 200 59
t_invoices_tmp_dia 8 1 0 0 31
t_invoices_tmp_vio 8 1 0 0 72
t_equipshist 176 170 85 2018 78
t_invoices 145149 102731 80130 2724388 55
t_phone_rev 13960 13949 7036 379929 33
I understand this to mean that t_invoices_ar_temp has been allocated
136,563 pages but only 17 are in use!! There has been no activity
Either I totally misunderstand this output or there was a been a very
worrying, massive overallocation of pages to this table or there is
third, very mysterious explanation.
Can anyone help me to understand what is happening here?
Thanks,
Chris Bullivant