RE: Actual Used space
Posted in 1996
Mike and Wayne
There is a method for calculating extent size for a table, which starts =
with no_of_rows * row_size, but is much more tedious than that. It is =
laid out in the FM somewhere, and I still have a C program to do the =
calculations like the FM says. An easier way is to use the sysextents =
SMI table which reports the extent sizes for each extent for a table, in =
pages. Another way is to use oncheck -pt with the database and table =
name. This will return the first extent size and next extent size, among =
other things.
And yes, for oncheck -pt or sysextents to work, you need to UPDATE =
STATISTICS.
Hope this helps
Sujit Pal
DBA, Computer Sciences Corp.
----------
From: Mike Segel[SMTP:mikey@segel.com]
Sent: Monday, September 09, 1996 5:07 PM
To: informix-list@rmy.emory.edu
Subject: Re: Actual Used space
Wayne Kidd wrote:
>=20
> Does anyone have a query for the SMI tables or any other
> tables, that will return the actual used space of a table.
> I am setting up a database copy function that will copy an
> entire database ( several thousand tables ) and I do not
> want it to use the source system current extent sizes, I
> want it to use the actual size for the target system so I
> have to determine what that is. Thanks in advance.
OK, let me get this right:
You want to calculate the actual size of the table?
Like by taking the number of rows and multiplying by the size
of the row?
That should tell you the size of the tables, but then you need to=20
figure out the size of the indexes too. (Same type of calculation=20
I guess.)
Anyone know of an easier way? Also, do you need to run
update statistics?
-Mikey