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

Pinned topic Real-time data for DB2

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

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.

Updated on 2012-10-29T14:37:13Z at 2012-10-29T14:37:13Z by SystemAdmin
  • SystemAdmin
    5837 Posts

    Re: Real-time data for DB2

    Hello Nikita,

    To discover which queries are the most expensive on a production workload, you might want to use the "monitor routines and views" :

    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.

    Yves-Antoine Emmanuelli