Slow JQL Logging

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
Chris Fuller Atlassian Team Feb 03, 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.

 

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
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

23,436 views 2 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you