Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 table vs Cobol Array

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: DB2 table vs Cobol Array
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

Site Director


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

PostPosted: Thu Sep 23, 2010 5:18 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us