Opening DB2 cursor multiple times will affect performance ?



IBM's flagship relational database management system

Opening DB2 cursor multiple times will affect performance ?

Postby gauthamnagpur18 » Wed May 25, 2016 8:39 am

Hi All,

While analyzing cobol-db2 program of high execution time(5hrs+), found out that same cursor has been opened for 29 times.
We are just changing the policy type each time.
Cursor has simple select query from three tables.
There are total 2.8 Million rows, If we don't put "Where" clause in select query.

I believe opening cursor multiple times is affecting performance.

I am planning to extract via INZUTILB utility and format using COBOL program. For extraction, it just took 4 mins of execution time. I kept all the 29 values in IN predicate of select query.

Before I start formatting the data, I would like to hear from experts is there any other way to reduce execution time?

Thanks in advance.
gauthamnagpur18
 
Posts: 93
Joined: Sat Oct 23, 2010 1:28 pm
Location: Chennai, India
Has thanked: 3 times
Been thanked: 2 times

Re: Opening DB2 cursor multiple times will affect performance ?

 

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post