How would you cross check long running queries in mysql?
Solution: Two ways to do it...
1. Start mysqld with the --log-slow-queries[=file_name]
2. In my.cnf write
log-slow-queries=file_name
Next question is what is the unit of time that we consider as threshold for measuring long running queries?
Answer is seconds and its default value is 10s
Its value can optionally be changed as
long_query_time=1
Solution: Two ways to do it...
1. Start mysqld with the --log-slow-queries[=file_name]
2. In my.cnf write
log-slow-queries=file_name
Next question is what is the unit of time that we consider as threshold for measuring long running queries?
Answer is seconds and its default value is 10s
Its value can optionally be changed as
long_query_time=1
No comments:
Post a Comment