1

There are two modes to execute a pl1 DB2 main program- one with TEST mode. In this case, for each input record db2 statements in the sub program are executed as usual, but before completing the execution of single input processing Roll back is executed. Normal run COMMIT is being used instead of Rollback.

TEST mode - Rollback after each input processing

Normal mode - Commit after each input processing

Q. If I use TEST mode, Is there any deviation in execution time as that of normal mode(COMMIT)? I would like to execute the code in TEST mode, but still i need to measure the execution time of each input record as that in Normal mode. Is this possible? DB2 server is on linux machine.

cobp
  • 772
  • 1
  • 5
  • 19

1 Answers1

2

Execution time of a statement without its respective COMMIT or ROLLBACK will be the same, ceteris paribus, regardless of whether it is followed by a COMMIT or a ROLLBACK. However, measuring it would be meaningless, because the contribution of a COMMIT in the "normal" mode can be significant. Similarly, measuring the execution time of "statement + ROLLBACK" in the test mode is also meaningless, as it will be different from that of "statement + COMMIT" in the "normal" mode.

mustaccio
  • 18,234
  • 16
  • 48
  • 57
  • ok exact execution might vary, so the execution times would not be same. But it could be useful for comparing the changes. – cobp Oct 07 '21 at 09:51