Problem(Abstract)
This article describes how to calculate space used for each table and dbspace, including how many extents are used and allocated.
Resolving the problem
Q. How do I calculate how much space is used on my instance?
A. You can use a SMI query to calculate how much space is used.
Note, however, that the output will only be accurate if you run update statistics HIGH for each table before running the query.
select n.dbsname[1,20],
n.tabname[1,20],
count(*) no_extents,
round(t.rowsize * t.nrows / 2048,0) used,
sum( pe_size) allocated
from sysmaster:systabnames n, sysmaster:sysptnext p, systables t
where n.partnum = p.pe_partnum
and n.partnum = t.partnum
and t.tabtype = "T"
group by 1,2,4
order by 3 desc , 5 desc;
Note: This SQL assumes that you are using 2048 page size.
'Informix > informix reference' 카테고리의 다른 글
An sql query to determine table space usage within a dbspace (0) | 2011.11.12 |
---|---|
Checking what tables are created on any specific dbspace (0) | 2011.11.12 |
Sysmaster query for determining additional extents availble per table/index. (0) | 2011.11.12 |
INFO Statement (0) | 2011.11.11 |
IDS Interoperability with Other Products (0) | 2011.11.03 |