Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL statement execution order and performance

Roman Smatana
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 30, 2020

Hello,

What JQL statement performs better ?

A) project = "ABC" and type = "Task"

B) type = "Task" and project = "ABC"

 

For me the normal is to start with project clause first , so the JQL execution engine will narrow the result set. Or maybe JIRA has some build in optimizer inside.

I am asking because when having plugins (like structure) which heavily calls JQLs to sync issues and structures, this might create big performance penalty if the order is important.

Can you help ?

Thank

Roman

 

1 answer

1 accepted

1 vote
Answer accepted
Egor Tasa [ALM Works]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2020

Hi Roman,

There is an article by Atlassian about JQL performance: https://confluence.atlassian.com/jirakb/factors-contributing-to-jql-performance-in-jira-server-740263450.html

Typically, I'd say JQL A should perform better but in fact, the difference estimated is rather small, since no text search or heavy functions are involved.

Regards,
Egor Tasa

ALM Works

Roman Smatana
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 31, 2020

Do you know how scriptrunner functions for linking (i.e. issueFunction not in hasLinks("related")) generally affects performance ? I have seen this on a few Structure automations

Thnanks

Roman

Rob Horan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2020

Hi @Egor Tasa [ALM Works]  - would it be fair to assume this mostly applies to Cloud as well?

Egor Tasa [ALM Works]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 1, 2020

Hi @Roman Smatana 

ScriptRunner functions do not generally go well with Structure, they are not expected to run almost continuously and that is what happens in a structure. Larger functions like linkedIssuesRecursive and similar are particularly bad for performance.

It does not mean that they are bad for performance in general, but used in a structure they can create problems.

Regards,
Egor

Egor Tasa [ALM Works]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 1, 2020

Hi @Rob Horan 

Yes, I believe JQL works in the cloud very similarly. 

Regards,
Egor

Suggest an answer

Log in or Sign up to answer