-
Bug
-
Resolution: Fixed
-
Low
-
7.5.3, 7.6.2
-
7.05
-
24
-
Severity 2 - Major
-
49
-
-
Summary
JIRA performance is impacted by slow queries pulling data from the customfieldvalue table due to lack of indexing on the newly introduced UPDATED column.
This issue impacts JIRA 7.5 and above.
The issue is specifically amplified if JIRA has Service Desk installed with many SLAs defined.
This problem also impacts JIRA reindexing speed which can be already slow for large instances.
Environment
- JIRA 7.5 and above
- JIRA Service Desk
- Big instances with 500k+ issues, and 500+ Custom fields.
Steps to Reproduce
- Install JIRA 7.50 or any version above.
- Create some test data containing a lot of custom fields.
- Try to comment on an issue or create a new issue, or run reindexing.
Expected Results
Selects Queries on customfieldvalue should execute quickly, coming back in less than 2ms.
Actual Results
The queries are not fast and in big instances can cause performance issues.
$ egrep "ISSUE=" atlassian-jira-sql.log*|grep "JiraTaskExectionThread-4 user1 820x222030x1"|grep customfieldvalue |head -500|tail -2 atlassian-jira-sql.log:2018-03-01 13:43:58,550 JiraTaskExectionThread-4 user1 820x222030x1 1nlzej4 /secure/admin/IndexReIndex.jspa 2ms "SELECT ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE FROM customfieldvalue WHERE ISSUE='1310006' ORDER BY UPDATED ASC, ID ASC" atlassian-jira-sql.log:2018-03-01 13:43:58,552 JiraTaskExectionThread-4 user1 820x222030x1 1nlzej4 /secure/admin/IndexReIndex.jspa 2ms "SELECT ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE FROM customfieldvalue WHERE ISSUE='1310006' ORDER BY UPDATED ASC, ID ASC" $ egrep "ISSUE=" atlassian-jira-sql.log*|grep "JiraTaskExectionThread-4 user1 820x222030x1"|grep customfieldvalue |head -1000|tail -2 atlassian-jira-sql.log:2018-03-01 13:43:59,644 JiraTaskExectionThread-4 user1 820x222030x1 1nlzej4 /secure/admin/IndexReIndex.jspa 2ms "SELECT ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE FROM customfieldvalue WHERE ISSUE='1310004' ORDER BY UPDATED ASC, ID ASC" atlassian-jira-sql.log:2018-03-01 13:43:59,646 JiraTaskExectionThread-4 user1 820x222030x1 1nlzej4 /secure/admin/IndexReIndex.jspa 2ms "SELECT ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE FROM customfieldvalue WHERE ISSUE='1310004' ORDER BY UPDATED ASC, ID ASC" $ egrep "ISSUE=" atlassian-jira-sql.log*|grep "JiraTaskExectionThread-4 user1 820x222030x1"|grep customfieldvalue |head -3000|tail -2 atlassian-jira-sql.log:2018-03-01 13:44:05,913 JiraTaskExectionThread-4 user1 820x222030x1 1nlzej4 /secure/admin/IndexReIndex.jspa 2ms "SELECT ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE FROM customfieldvalue WHERE ISSUE='1310009' ORDER BY UPDATED ASC, ID ASC" atlassian-jira-sql.log:2018-03-01 13:44:05,922 JiraTaskExectionThread-4 user1 820x222030x1 1nlzej4 /secure/admin/IndexReIndex.jspa 2ms "SELECT ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE FROM customfieldvalue WHERE ISSUE='1310009' ORDER BY UPDATED ASC, ID ASC" $
The issue gets much worse if we have many custom fields and if Service Desk is installed.
The above data is coming for a quite fast database, even though the queries are taking 2ms to complete.
The more custom fields we have the more it will take to get the data and time add up.
- is caused by
-
JSDSERVER-5299 SLA custom field should use last updated value if the event of a race condition
- Closed
- relates to
-
JRASERVER-67011 Duplicate value in "Time in Status" Field persists despite fix code in place
- Closed
-
JSDSERVER-6043 Issue update/create is slow due to SLA indexing takes a long time
- Closed
-
JRASERVER-71233 Custom fields with stale values break reindexing
- Closed
-
JSDSERVER-5299 SLA custom field should use last updated value if the event of a race condition
- Closed
-
JSDSERVER-5681 Non-optimal computation of SLA values in addDocumentFields() method
- Closed
-
JSDSERVER-5685 While loading values for SLA CustomField getValueFromIssue method flushes EagerLoadingOfBizCustomFieldPersister cache
- Closed
-
JRASERVER-67823 JIRA may become unresponsive when creating too many concurrent create requests due to transaction in OfBizCustomFieldValuePersister
- Gathering Impact
- Mentioned in
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...