Re: How to calculate the exact used space and free space at
Posted in 2003
Topics: High Availability & Replication, Data Types & Schema Design
Oh, now that's getting kinky! Just look in sysptnhdr or run oncheck -pT the
calculation would only be an estimate and would probably give you (or me for
that matter) a headache. ;-)
Art S. Kagel
----- Original Message -----
From: Deepak Patel <Deepak.Patel@in.efunds.com>
At: 3/ 5 7:45
> How should I calculate the exact used space and free space at page (2K) level
> when row sizes are
> greater than page size, or if TEXT, BYTE or VARCHAR are used.
>
> TIA
> Deepak
If you
are looking for size of the table and freespace of the table try
this.
select systabnames.tabname table_name,
dbinfo( "DBSPACE" , systabnames.partnum ) dbspace,
(nptotal * 2) allocated_space,
((nptotal - sysptnhdr.npused) * 2) free_space
from systabnames, "ENTER_YOUR_DBNAME_HERE":systables, sysptnhdr
where "ENTER_YOUR_DBNAME_HERE":systables.partnum = sysptnhdr.partnum and"ENTER_YOUR_DBNAME_HERE":systables.partnum = systabnames.partnum and
tabid > 99 and tabtype = "T"
group by 1,2,3,4
order by 2,1;
I got it from Carlton Doe's book Informix-Online Dynamic Server Handbook
(Which is a great book might I add)
-----Original Message-----
From: ART KAGEL, .... [mailto:KAGEL@bloomberg.net]
Sent: Wednesday, March 05, 2003 8:38 AM
To: ids@iiug.org
Subject: Re: How to calculate the exact used space and free space at
[590]
Oh, now that's getting kinky! Just look in sysptnhdr or run oncheck -pT the
calculation would only be an estimate and would probably give you (or me for
that matter) a headache. ;-)
Art S. Kagel
----- Original Message -----
From: Deepak Patel <Deepak.Patel@in.efunds.com>
At: 3/ 5 7:45
> How should I calculate the exact used space and free space at page (2K)
level
> when row sizes are
> greater than page size, or if TEXT, BYTE or VARCHAR are used.
>
> TIA
> Deepak