One of the way to improve performance for Cobol DB2 program is to load a DB2 to an array especially when the DB2 table is being accessed repeated ly in a program.
What is the optimum range for the number of rows in DB2 table where this technique can provide reasonable CPU time saving.
My situation is - I have a DB2 table with 100,000 rows and my select statement is selecting 4 columns from this table for 600,000 times. Is Loading this DB2 table to an Array and performing the binary search will show me reasonable performance improvement.
I completely understand that this can be easily tried and tested. However not having enough access on development environment is not allowing me to test myself.
Any suggestions based on your experience will be helpful.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
However not having enough access on development environment is not allowing me to test myself.
I think not. . . When you write the code, you will have to test it. If there are problems, you will have to test it more. Start early. . .
From what has been posted, people can guess, but the actual results will depend on "things" not posted here.
Is Loading this DB2 table to an Array and performing the binary search will show me reasonable performance improvement
Maybe - maybe not.
Is there some reason that the process cannot read each entry in the table only once? If the input data was in order by the random value used to read the table (if the table is randomly accessed by a key), there would only be a need to read the table row one time for each "key".
As i mentioned, the question as posted is too generic for any specific answer.