issuefunction in expression continually running

After running a query including the following query

issuefunction in expression("", "assignee != reporter")

The query was started at 15:00.  Completed in about 30s but the following threads didn't complete until around 16 minutes later.  Actually I was able to run the same query again, which compounded the issue.  (one of our users in production did this 12 times! which caused JIRA to become unstable for nearly 30 min)

The thread takes a long time to stop (even after the query has returned it's results) and the following is posted repeatedly to the "atlassian-jira-slow-queries.log"

 

2015-05-14 15:16:08,320 ajp-bio-8009-exec-11 INFO anonymous 899x28495x2 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1655' ms to run.

2015-05-14 15:16:08,862 ajp-bio-8009-exec-14 INFO anonymous 903x28504x3 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1419' ms to run.

2015-05-14 15:16:09,933 ajp-bio-8009-exec-11 INFO anonymous 899x28495x2 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1556' ms to run.

2015-05-14 15:16:10,251 ajp-bio-8009-exec-14 INFO anonymous 903x28504x3 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1310' ms to run.

2015-05-14 15:16:11,590 ajp-bio-8009-exec-11 INFO anonymous 899x28495x2 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1599' ms to run.

2015-05-14 15:16:11,634 ajp-bio-8009-exec-14 INFO anonymous 903x28504x3 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1324' ms to run.

1 answer

Well, this term (issuefunction in expression("", "assignee != reporter")) will be evaluated against all issues - that is why it is slow. You should always add a subquery to it:

issuefunction in expression("Project =ABC", "assignee != reporter")

Then it will evaluate the expression "assignee != reporter" it only against those issue found in the subquery. This should speed up your query.

BTW: I think this is a scriptrunner JQL function (not jtricks)

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Thursday in Off-topic

Friday Fun: Magic Eyes

...staring into the background. Once the image pops out in 3D, you can look around the picture and enjoy. If you will see if you are a true illusion master! :) You did it? :) Wow! Awesome! As a bonus...

445 views 83 11
Join discussion

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