-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log slow queries #6429
Comments
@jwilder when should the message be printed?
The first is easier and doesn't require an extra goroutine running, but you may want it to be printed while the query is actively running. |
@jsternberg While running. |
@jsternberg @jwilder yeah I agree. I think it's more important that you know some query was slower than |
I have added Custom Headers(X-Request-Id) to keep track of logs for each API request. |
Feature Request
The database should be able to log queries that exceed a threshold to assist operators with identifying potential problematic queries. This setting should log the slow queries even if query logging is disabled.
We currently have a
query-timeout
setting that will kill a long running query. We also haveshow queries
that will report the duration of the query. These are similar ideas, but solve slightly different use cases. Thequery-timeout
is intended to automatically kill queries to prevent them from consuming too many resources. Theshow queries
statement is useful for interactive monitoring of queries currently running.The slow query log setting would is useful to identify slow queries retrospectively.
The text was updated successfully, but these errors were encountered: