Tips for Writing JQL Queries

Occasionally, you may encounter long loading times, which can be a result of writing inefficient queries. The image below summarises how you can write efficient queries and how you can avoid writing inefficient ones:

Some additional tips for writing efficient queries include:

  • ScriptRunner Enhanced Search allows for sub-queries, which can be optimised separately before being included in the main query.

  • We process Enhanced Search functions individually, so try to minimise the data set within that function's parameters in order to get a benefit.

  • Limit the scope by project and issue types, use time restrictions, status filters, and assignees.

The list below highlights the most performance-intensive functions which you should be aware of when using:

  1. linkedIssuesOf

  2. Recursive functions

  3. projectMatch

  4. versionMatch

  5. componentMatch