Topic
1 reply Latest Post - ‏2012-10-29T14:37:13Z by SystemAdmin
SystemAdmin
SystemAdmin
5837 Posts
ACCEPTED ANSWER

Pinned topic Real-time data for DB2

‏2012-10-29T05:20:48Z |
Hi,

We need to find out how can we track how & where real-time data for DB2 is shown with regards to open cursors, locks on the tables. Using these information we can find out which query is taking time & the reason behind it so that we can tune that query.
Kindly help us on this.

Thanks in advance.

Regards,
Nikita
Updated on 2012-10-29T14:37:13Z at 2012-10-29T14:37:13Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    5837 Posts
    ACCEPTED ANSWER

    Re: Real-time data for DB2

    ‏2012-10-29T14:37:13Z  in response to SystemAdmin
    Hello Nikita,

    To discover which queries are the most expensive on a production workload, you might want to use the "monitor routines and views" :
    http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.sql.rtn.doc/doc/c0053963.html

    MON_PKG_CACHE_SUMMARY or MON_GET_PKG_CACHE_STMT will assist you detecting the heaviest queries.

    MON_LOCKWAITS would provide you with information about LOCKWAITS.

    If you need actual realtime tracing, you can use the event monitor for LOCKING (introduced in version 9.7), or the old event monitor for STATEMENTS.

    Regards
    Yves-Antoine Emmanuelli