Calculating avail/empty rows in extents.
Posted in 1999
Topics: Storage & Space Management
How can I calculate the number of rows that can be inserted into a table before another extent is automatically added? Also, is there anything to keep in mind when calculating for fragmented tables? I'm using Informix Dynamic Server 7.30.UC7 on HP/UX 10.20, and HP/UX 11.0.
Russell Bierschbach wrote:
>
> How can I calculate the number of rows that can be inserted into a table
> before another extent is automatically added? Also, is there anything to
> keep in mind when calculating for fragmented tables? I'm using Informix
> Dynamic Server 7.30.UC7 on HP/UX 10.20, and HP/UX 11.0.
Use oncheck -pT to determine how many unused and partially used data
pages there are within the existing extents, then calculate the rowsize
(or get it from dbschema) and ddivide 2020 by (rowsize + 4) to
determine the number of rows per page (you will get a few more if your
table contains varchar columns which are less than max length on
average, if so you can adjust the rowsize to the actual average rowsize
rather than the max size dbschema uses). Now multiply the average or
actual number of rows per page by the number of unused pages and 1/3 of
the number of partial pages and there is your best estimate.
Art S. Kagel