Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004

    Unanswered: how to measure statement execution time

    Hi all,
    How can I measure execution time DB2 server spent on queries or insert/update statements? Do I use its mechanism of system monitor? I looked at reference there is "monitor element" called elapsed_exec_time. But I dont know how to use it to check statement run time. It seems difficult for me to understand and work with DB2's "system monitor" Can any one give me any instruction? I only want to know how to get statement execution time. I'm using DB2 V8.1 enterprise edition on Linux.Thanks in advance.

  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    update monitor switches using statement on
    get snapshot for dynamic sql on <database alias>

  3. #3
    Join Date
    Mar 2004
    You can also use the db2batch command.

    regards & thanks


  4. #4
    Join Date
    Oct 2004
    You Can compile the program(say COBOL) with explain plan YES and then monitor the PLAN_TABLE and DSN_STATEMENT_TABLE which will tell u about the query number in program and different statements and its timings in unit PROCSU column.
    Or if simply run Set Statementid ='xyz' for select statement and see the corresponding statementid in respective tables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts