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.
SystemAdmin 110000D4XK5837 Posts
Re: Real-time data for DB22012-10-29T14:37:13ZThis is the accepted answer. This is the accepted answer.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.