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 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
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,086 views 4 9
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