I have created a new application in Grails and surprisingly, in production environment it was slower than on my laptop. Production administrator found that my application generate too many SQL queries. The delay was caused by network latency. So, I had to find a way how to monitor number of SQL queries on MySQL server.
For monitoring of the current session, there is a handy command:
show status where variable_name='Com_select'
For monitoring of all the sessions, there is a switch:
show global status where variable_name='Com_select'
All variables could be listed by