Amit:
I like David's and Paul's responses, but, on the off chance that the table is fixed length, here's how to determine how many pages a give number of rows will require (We'll deal with the indexes later):
pagesz = <bytes of a page in the given dbspace>
rowsz = 758 bytes
rows_per_page = floor( (pagesz - 24) / (rowsz + 4) )
num_pages = num_rows / rows_per_page
num_pages = num_pages + (num_pages / (pagsz * 2)) # Add in bitmap pages
For variable length rows, use the average row size of actual or expected data instead of the engine's maximum row size or make two calculations, one using the max row size and one using the estimated minimum row size to guide expectations.
Index sizing: This is tricky:
pagesz = <# bytes in the dbspace to hold the index>
keysz = 1.15 * (bytes per index key + 8) (add up the maximum lengths of all columns in the key)
Use keysz in the num_pages formula above instead of rowsz.
num_pages = ((num_pages * 100) / FILLFACTOR)
This mainly works for indexes built on a filled table. For an index that grows over time, instead of the configured FILLFACTOR use 50 if the keys are normally distributed and 95 if the key grows monotonically (like an index on a SERIAL column). You will have to do each index separately.
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com------------------------------
Original Message:
Sent: Thu August 12, 2021 06:58 AM
From: AMIT PATEL
Subject: Extent size and data forecast
Hello everyone,
Please tell me the simple formula for calculating the INITIALI and NEXT extent size for below criteria.
TABLE "informix".cs_cust row size = 758 number of columns = 50 index size = 331
If customer says table growth rate 100000 rows per month.
We have 2 GB chunk size and if dbspace has 4 chunks then How to forecsast for filling the dbspace?
Like with 100000 rows per months in what time dbspace can be filled ?
Thanks
Amit
------------------------------
AMIT PATEL
------------------------------
#Informix