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.
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
1 reply Latest Post - 2012-10-29T14:37:13Z by SystemAdmin
Pinned topic Real-time data for DB2
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-10-29T14:37:13Z at 2012-10-29T14:37:13Z by SystemAdmin
SystemAdmin 110000D4XK5837 PostsACCEPTED ANSWER
Re: Real-time data for DB22012-10-29T14:37:13Z in response to SystemAdminHello 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.