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.