MySQL has feature of logging all sql queries - General log.
But this log does not contain queries durations.
How to log all sql queries to analyze those durations?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityMySQL has feature of logging all sql queries - General log.
But this log does not contain queries durations.
How to log all sql queries to analyze those durations?
I got an answer after writing a question, but i want to share it to community.
Just set up Slow log and set SET GLOBAL long_query_time = 0
.
You will see all sql queries with durations in slow log file.
pt-query-digest
or mysqldumpslow -s t
to discover the 'worst' queries and deal with them.
Aug 25, 2018 at 15:05