Slow JQL Logging

MikeD February 3, 2015

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.

1 answer

2 votes
crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 3, 2015

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.

 

Andriy Yakovlev [Atlassian]
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 17, 2015

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}

Suggest an answer

Log in or Sign up to answer