IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 table vs Cobol Array


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manoopatil

New User


Joined: 07 Dec 2003
Posts: 56
Location: Montreal

PostPosted: Thu Sep 23, 2010 4:57 am
Reply with quote

Hi All,

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.

Thank you
-Manohar
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Sep 23, 2010 5:18 am
Reply with quote

Hello,

Quote:
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.

Quote:
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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Load new table with Old unload - DB2 DB2 6
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top