NOTICE: Our Community is moving. Get more information.
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?
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 secs3 alternate keys = 6 mins 19 secs4 alternate keys = 6 mins 29 secs5 alternate keys = 30 mins 08 secsSo 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 keysThe Max Tree Depth value can be found by running the rebuild /f command against the desired file.