Not always but very often I am complained of extreme slowness in Jira's response to JQL executions. excluding delays of connection to the DB, does it also happen to you?
Example:
issuetype = Story AND "Feature Confluence Link" is not empty AND issueFunction in hasLinkType("User Story Related")