Introduce an option to Log slow queries instead of all queries

Description

In real life, we want to find out and optimize occasional slow queries. We don't want to log all queries and statistics information, because it creates huge log files and difficult to find slow queries.

I just need to log queries which executed slower than specified time according to configuration.
It will be disabled by default. This feature will be very important and useful for diagnosing some performance related issues. I've done code for this and I want to create pull request.

Environment

None

Status

Assignee

Batbileg Dorj

Reporter

Batbileg Dorj

Fix versions

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Feedback Requested

2019/02/05

Feedback Requested By

Batbileg Dorj

Components

Priority

Major
Configure