OPEN CURSOR TAKES A LONG TIME
There is peculiar thing that I noticed while testing a COBOL DB2 program, one of the OPEN cursor is taking a very long time almost 40 mins. The cursor is selecting data from just one table and no join is involved, there althoug various conditions and group clause used in the cursor.
The same cursor when run against production database does not take this much time. The test tables are recently refreshed using production data.
I am unable to guess what could be the problem here. Also it will be great if someone can suggest a way to debug this situation.