Forums/Community Help

Answered

long_query_time

Igor
asked this on May 24, 2013 13:49

I can't change this dynamical variable long_query_time on either of 3 Galera nodes running under cluster control from default 0.5 to the value I need.

SHOW GLOBAL VARIABLES LIKE 'long_query_time';

+-----------------+----------+
| Variable_name | Value |
+-----------------+----------+
| long_query_time | 0.500000 |
+-----------------+----------+

SET GLOBAL  long_query_time = 1;

SHOW GLOBAL VARIABLES LIKE 'long_query_time';

+-----------------+----------+
| Variable_name | Value |
+-----------------+----------+
| long_query_time | 1.000000 |
+-----------------+----------+

5 sec later it reverses back to 0.5

SHOW GLOBAL VARIABLES LIKE 'long_query_time';

+-----------------+----------+
| Variable_name | Value |
+-----------------+----------+
| long_query_time | 0.500000 |
+-----------------+----------+

The my.cnf was completely ignored as well. With such a low long_query_time value virtually every query increment  Slow_queries status var.

What's happening?

Many thanks.

 

 

Comments

User photo
Johan
Severalnines

Hi,

By default CMON manages the slow query log (turn it on off), this is because:

1) the slow query log must not grow too big, it starts to slow down queries significantly after a while

2) the agent parses the slow query log and provides it as input to the Query Monitor (then it is not a good idea if it is too big either as it becomes too much too parse.

Anyways, if you want to use your own settings do:

Go into Settings -> Query Monitor

You then find a bunch of options.

One of them is  Mysql Local Query Override , set it to 'yes'

Best regards

Johan

May 24, 2013 14:10
User photo
Igor

Hi Johan, That was useful. I can see you can change the var value there. This is what I need.

Many thanks for your quick response.

May 24, 2013 14:18