Build Efficient 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:

  • 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.

  • Always place project, status, and date filters inside the function itself, so only relevant issues are evaluated from the start.

  • Add a time-based condition inside the function to limit results to relevant, recent issues.
  • Always include an issue type filter inside the function when using recursive or relationship-based functions.
When writing queries, ensure that you have entered a space after the comma in the query you are running, or you may see the error message "Function 'X' does not exist".

It's worth noting the most performance-intensive functions in Enhanced Search, as listed below:

  1. linkedIssuesOf

  2. Recursive functions

  3. projectMatch

  4. versionMatch

  5. componentMatch

You can refer to our Troubleshooting section for more information.

How to write efficient queries video walkthrough






On this page