If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > how to measure statement execution time

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-29-04, 10:00
rosbur rosbur is offline
Registered User
 
Join Date: Oct 2004
Posts: 7
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.
Reply With Quote
  #2 (permalink)  
Old 10-29-04, 10:07
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
update monitor switches using statement on
get snapshot for dynamic sql on <database alias>
Reply With Quote
  #3 (permalink)  
Old 10-29-04, 11:24
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
You can also use the db2batch command.


regards & thanks

Mujeeb
Reply With Quote
  #4 (permalink)  
Old 10-30-04, 00:17
vivek12345 vivek12345 is offline
Registered User
 
Join Date: Oct 2004
Posts: 13
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On