Is there any logging that can be turned on to know when a slow JQL is executed? We are running into issues where users are creating inefficient JQLs with functions, such as:
project = ACME AND issue in parent("status in (verified, released, closed, deployed)")
Ideally I'd like to turn on logging when a JQL takes a long time and then we can investigate if the JQL can be improved and notify the owner.
This is already done automatically by default. Look for JIRA_HOME/log/atlassian-jira-slow-queries.log
. It logs anything that takes 400 ms or longer.
If you find that it isn't present or isn't logging as expected, then check to make sure that there is a setting for com.atlassian.jira.issue.search.providers.LuceneSearchProvider_SLOW
on the "Logging and Profiling" administration page. It would need to be set at the INFO
level.
note 400 ms duration is not tunable: {code} // NOTE: this is only here so we can flag any queries in production that are taking long and try to figure out // why they are doing that. final long timeQueryTook = opTimer.end().getMillisecondsTaken(); if (timeQueryTook > 400) { logSlowQuery(query, searchQueryString, timeQueryTook); } {code}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.