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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

79 views 0 5
Read article

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