Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
AMIT PATEL — source: IBM Community (ConnectedCommunity.org) Informix forum
Good morning All,
Kindly le t me know , if I run "
onstat -g act -r 2" and get multiple rows with some RSTCB values , so how can we check which SQL causing to run slow query.
Because it will be tough to check which RSTCB value is constant among multiple rows.
Thanks
Amit Patel
------------------------------
AMIT PATEL
------------------------------
#Informix
↪ replying to AMIT PATEL
AMIT PATEL — source: IBM Community (ConnectedCommunity.org) Informix forum
If like multiple rows , then how can be checked which thread id we need to compare ?
Regards
Amit P
------------------------------
AMIT PATEL
------------------------------
↪ replying to AMIT PATEL
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
Instead of using -r2 run the onstat in a loop with a sleep and write each output to a different file. Then you can diff the files to find the long runners:
iter=0;
while [ $iter -lt 10 ]; do
onstat -g act >act.$iter.outsleep 2
iter=$(( iter + 1 ))
done
You could also enable SQLTRACE and poll the data from there periodically to determine long running queries. Also there are 3rd part applications that will track that for you: iWatch and SQL PowerTools
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.