Calculate Space Requirements for ISAM Tables
Follow these steps to determine the amount of space needed to store the data in an ISAM table:
1. Create the table and modify it to ISAM.
2. Determine the number of rows that fit on a page (adjusted for data page fillfactor) and the number of keys that fit on an index page.
select tups_per_page * table_dfillpct/100, keys_per_page from iitables where table_name = ‘tablename’;
3. Determine the number of data pages needed for the table:
data_pages = (num_rows / tups_per_page)
4. Determine the number of index pages needed for the table:
index_pages = data_pages / keys_per_page
Note: When rows span pages, use the following calculation instead:
index-pages = num_rows / keys_per_page
5. Determine the total number of pages needed for the table. The total includes data pages and index pages. The total number of allocated pages in an ISAM table is never less than keys_per_page.
total_isam_pages = data_pages + index_pages
if (total_isam_pages < keys_per_page)
total_isam_pages = keys_per_page
Last modified date: 04/03/2024