![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Comments from backstage: Not all the wait times are being added below (missing IOs) so not necessarily an error. I don't think he's using an appropriate interface tho to diagnose stored procedure slowdown. The metrics reported for a given section in the package cache only describe the processing of that section - they are not the aggregates across all nested sections (assuming the procedure he's investigating is issuing SQL statements). This topic in the info center (in particular Figure 3) describes the hierarchy of time-spent metrics available for statements, and also indicates that the wait times reported do not include the wait times of nested statements (see the final "Other" bullet point in the table): http://publib.boulder.ibm.com/infoce...dex.jsp?topic=.... Something like the following topic in the info center may be more useful. http://publib.boulder.ibm.com/infoce...dex.jsp?topic=.... This topic describes using an activity event monitor to capture information about each stament a procedure executes and then aggregates elapsed time across all children. Using this you could first identify which statement(s) are taking the most time in the procedure. Then could drill down on a given statement by feeding the statement metrics (in the details_xml column of the activity table in the activity event monitor) into the MON_FORMAT_XML_TIMES_BY_ROW table function to see a breakdown of where that statement is spending it's time (could also choose to explain the statements that are taking the most time). --------- Also if you follow teh link in my footer (Oracle2DB2Wiki) you will find a profiler which you may find useful. -- Serge Rielau SQL Architect DB2 for LUW, IBM Toronto Lab Blog: * *tinyurl.com/SQLTips4DB2 Wiki: * *tinyurl.com/Oracle2DB2Wiki Twitter: srielau |
#4
| |||
| |||
|
|
On Mar 21, 10:40*pm, Serge Rielau <srie... (AT) ca (DOT) ibm.com> wrote: Comments from backstage: Not all the wait times are being added below (missing IOs) so not necessarily an error. I don't think he's using an appropriate interface tho to diagnose stored procedure slowdown. The metrics reported for a given section in the package cache only describe the processing of that section - they are not the aggregates across all nested sections (assuming the procedure he's investigating is issuing SQL statements). This topic in the info center (in particular Figure 3) describes the hierarchy of time-spent metrics available for statements, and also indicates that the wait times reported do not include the wait times of nested statements (see the final "Other" bullet point in the table): http://publib.boulder.ibm.com/infoce...dex.jsp?topic=.... Something like the following topic in the info center may be more useful. http://publib.boulder.ibm.com/infoce...dex.jsp?topic=.... This topic describes using an activity event monitor to capture information about each stament a procedure executes and then aggregates elapsed time across all children. Using this you could first identify which statement(s) are taking the most time in the procedure. Then could drill down on a given statement by feeding the statement metrics (in the details_xml column of the activity table in the activity event monitor) into the MON_FORMAT_XML_TIMES_BY_ROW table function to see a breakdown of where that statement is spending it's time (could also choose to explain the statements that are taking the most time). --------- Also if you follow teh link in my footer (Oracle2DB2Wiki) you will find a profiler which you may find useful. -- Serge Rielau SQL Architect DB2 for LUW, IBM Toronto Lab Blog: * *tinyurl.com/SQLTips4DB2 Wiki: * *tinyurl.com/Oracle2DB2Wiki Twitter: srielau Thank you! A very useful response (I hope :-)) I will look into this further and maybe find out more. I also forgot to mention that this is not particular for one stored procedure - all of them wriiten in SQL PL. There seems to be a very high precentage wait time for all of them. Regards Odd B Andersen |
#5
| |||
| |||
|
|
I now have been told that pool_read/write_time was included in wait_time. Sorry for not remembering that :-) Most of the wait_time is just pool_read_time (97%). That explains why wait_time is so high, but then I ask myself - why is pool_read_time so high? I assume this is syncron I/O. And I have to look into it more in detail now if there are some settings that need to be changed. We have turned on AUTOMATIC wherever possible, including all bufferpools, and I assume that this is alright. But I wonder if one could have too many bufferpools, and if that could result in too much syncron I/O? We have 40 bufferpools, and 454 user-defined tablespaces. And if there is a limited amount of memory (12 GB in total) each bufferpool is fairly small and there will be almost continuous reading- in and writing-out of data. The database is 315 GB (test) and 1,3 TB (production). Just some thoughts on my part :-) But what I would like is some suggestions on where to start looking? |
![]() |
| Thread Tools | |
| Display Modes | |
| |