Running various .NET applications on DB2 with Statement-monitor active.
When I look at the output in the STMT_<monitornamne> table I can see lots of info about the execution.
Now I need help.
For each SELECT statement I get four rows in the table. STMT_OPERATION 1,4,6 and 8 (Prep, Open, Close and Commit).
The row with STMT_OPERATION 6 normally contains the info on rows_read and fetch_count. Most of the time consumed by the statement (stop_time-start_time) also shows up there.
In some SELECT statements most of the time shows up in the stmt_operation 1 row. Rows_read and fetch_count are still i operation 6.
The statements in both cases are SELECT:s with between 10 and 20 INNER and LEFT OUTER JOIN:s. No nicknames involved.
The total time is significantly lower for the statements where the time shows in the close opration than in the Prep operation.
The number of rows read and fetched are significantly higher för the statements with the lower time.
The amount of time for Close gets lower the second tim a statement is run., The time for Prep stays the same. Which makes sense...
Can somebody enlighetn me?
What is the reason for the time to show in prep instead of close?
What can I do about it?
Regards / Uffe