Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Increasing performance when using alternate keys in an indexed file

Increasing performance when using alternate keys in an indexed file

Problem

Customer has an indexed file that has several alternate keys defined.
They noticed that the performance of the file I-O seems to get worse as they add more keys.

Is there anyway to improve this performance?

Resolution:

There is an extfh.cfg option called INDEXCOUNT that can help to improve performance when a large number of keys are defined for a file.

For example, in a test where a file was being created with 8 million records the following results were found:

2 alternate keys =   5 mins 48 secs
3 alternate keys =   6 mins 19 secs
4 alternate keys =   6 mins 29 secs
5 alternate keys = 30 mins 08 secs

So the access time gets a little slower with each additional key until the file handler reaches a point where the performance suffers tremendously.

The INDEXCOUNT option controls the number of index nodes that will be cached for the file.
The default value in Visual COBOL is 32 but you can get better results when using a large number of alternate keys if you set this to a higher value.

For example, by raising this up to a value of 42 the timings for the test above for 5 alternate keys was reduced to 7 mins and 32 secs.

The ideal value for INDEXCOUNT can be calculated using the formula:

INDEXCOUNT= (Max Tree Depth * Number of keys) + Number of keys
The Max Tree Depth value can be found by running the rebuild /f command against the desired file.

 

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-04-19 08:49
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.