Details
-
Bug
-
Resolution: Fixed
-
Medium
-
5.2.5, 6.0.7
-
5.02
-
Description
NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.
Problem
A search via REST api call results in a high number of database queries, which could result in database performance issues.
Testing:
I ran a local test:
- Enabled SQL Logging in JIRA
- Ran search via issue navigator (HTTP)
project = test
- confirm SQL logging
- Ran search via REST api
curl -D- -u admin:admin -X GET -H "Content-Type: application/json" http://localhost:8079/rest/api/2/search?jql=project=test > restsearch-output
Results:
- both HTTP and REST searches returned 50 issues (there are a total 1201, but only 50 are shown at a time)
- the 50 issues are all the same issue keys in both searchs
- HTTP - 45 SQL queries
- including checks/updates to userhistoryitem table, 12 queries
- REST - 413 SQL queries
- including auth for the user, 20 queries
- did not seem to check/update userhistoryitem
Edit:
- Just ran same test with com.atlassian.jira.issue.search.providers set to DEBUG
- HTTP - 5 lines of DEBUG logging
- REST - 77 lines of DEBUG logging
- There seems to be extra queries relating to parenttasks. I ran a quick check and there are 10 sub-tasks in the search results.
- see attached file
Attachments
Issue Links
- relates to
-
JRACLOUD-34412 searching issues via REST results in a high number of database queries
- Closed
-
JRASERVER-36224 Getting issue list via REST api has huge performance issues regardless number of fields requested or expand values
- Closed
-
JDEV-30169 Loading...
- is cloned from
-
JDEV-24467 Loading...
(1 mentioned in)