4

I am trying to analyze the hibernate query performance in our application. I tried logging all hibernate queries which take more than 100ms execution time from application side as well as using mysql slow query log. I set the long_query_time = 0.10 in my.cnf.

Now my problem is some of the insert queries which are consistently taking more than 100ms from the application log are getting logged only few times in mysql sloq query log. Also some insert and select statements are not getting logged at all; but when I try running all these statements from SQLYog, they are taking more than 100ms.

Why mysql sloq query log is not logging these statements?

4
  • Could it be possible it is caused by network latency?
    – frlan
    Commented May 27, 2014 at 7:50
  • I doubt it , as the same insert queries are consistently logged in some flows but not in the other. The pattern remains the same. I am not sure whether the lock table time has some thing to do with this.
    – IS_EV
    Commented May 27, 2014 at 7:55
  • @BP_EV - Let's try a test: Run SELECT SLEEP(1); and see what the timing is in the slowlog versus SQLYog. (Do it a few times to make sure there is not too much variance.) I would expect both to be slightly bigger than 1.000s; the amount bigger may be instructive.
    – Rick James
    Commented Oct 17, 2018 at 23:06
  • And... Which engine?
    – Rick James
    Commented Oct 17, 2018 at 23:08

0

Browse other questions tagged or ask your own question.