Identifying slow JQL queries
Jira logs details about slow JQL queries to help you troubleshoot performance issues. There are two built-in mechanisms that help you identify slow queries.
On this page:
What is JQL execution time
The total query time includes the time needed to transform the search query into an engine-specific format, such as a Lucene or OpenSearch query, and to execute the query. Query execution involves running the query, performing all aggregations defined in the search request, sorting the results, and building the result documents.
Query execution time doesn’t include the time needed to transform the JQL query into a search query. Depending on the complexity of the query, this transformation can take a significant amount of time.
Identifying slow queries
To identify slow queries, you can use atlassian-jira-slow-queries.log or jira-diagnostics.log.
atlassian-jira-slow-queries.log
Each JQL query that takes longer than 400 ms is recorded in the atlassian-jira-slow-queries.log file. This threshold can’t be changed. Each log entry starts with the prefix c.a.j.search.issue.DefaultIssueDocumentSearchService_SLOW and includes the original JQL query and the number of results returned.
Only queries that finish successfully are logged.
Example entry:
2025-09-30 20:57:50,970+1000 http-nio-8090-exec-19 url: /jira/rest/issueNav/1/issueTable; user: admin WARN admin 1257x10527x2 zfhlry 0:0:0:0:0:0:0:1 /rest/issueNav/1/issueTable [c.a.j.search.issue.DefaultIssueDocumentSearchService_SLOW] QueryExecutionEvent{query={project = "PROJECT"}queryTermMetrics={projid:10000=TermMetric{termCounts=1, isCustomField=false}, project_permissions:p#10000=TermMetric{termCounts=1, isCustomField=false}, issue_level_permissions:s#-1=TermMetric{termCounts=1, isCustomField=false}}, numberOfClausesInQuery=3, numberOfCustomFieldsUsed=0, executionTime=7326, numberOfResults=6}
jira-diagnostics.log
Another mechanism is available through the Atlassian diagnostic plugin. Unlike the slow query log above, you can configure the slow JQL query threshold for Jira diagnostics. By default, this threshold is set to 5,000 ms. Log entries are recorded in the jira-diagnostics.log file.
This log entry includes additional stack trace details about the thread that triggered the slow query.
Example entry:
2025-09-30 20:57:44,326+1000 pool-31-thread-1 INFO [atlassian-diagnostics-data-logger] 1759229864107 ; INFO ; JQL ; JQL-1001 ; Slow JQL query - unknown reason ; not-detected ; ; ; {"threadDump":[{"id":63,"name":"http-nio-8090-exec-23 url: /jira/rest/issueNav/1/issueTable; user: admin","daemon":true,"state":"RUNNABLE","stackTrace":"..."}],"reason":"QueryExecutionEvent{queryTermMetrics={projid:10000=TermMetric{termCounts=1, isCustomField=false}, project_permissions:p#10000=TermMetric{termCounts=1, isCustomField=false}, issue_level_permissions:s#-1=TermMetric{termCounts=1, isCustomField=false}}, numberOfClausesInQuery=3, numberOfCustomFieldsUsed=0, executionTime=6248, numberOfResults=6}"}
Using OpenSearch to detect slow queries
If you run Jira with OpenSearch, you can use the built-in OpenSearch logging to identify slow queries. By default, OpenSearch slow query logging is turned off. To enable it, set a slow query threshold. Review how to configure search request slow logs in OpenSearch
Search request slow logs can consume significant disk space and impact performance if you set the threshold too low. We recommend matching this value to Jira’s threshold.
By using both Jira and OpenSearch slow query logging, you can quickly identify search bottlenecks. Jira query execution time includes the time to prepare an OpenSearch request and communicate over the network. By comparing the query times reported by Jira and OpenSearch, you can determine if the slowness is caused by query execution in OpenSearch or by slow network communication.
If neither Jira nor OpenSearch report slow queries, but you still experience slow searches, the issue might occur before the search request is executed. For example, the slowness could be caused by mapping a JQL query to a search query.