-
Suggestion
-
Resolution: Unresolved
-
None
-
0
-
1
-
Problem Definition
Table columnlayoutitem is used for storing Fields schema configs and it doesn't have optimal index structure.
Snippet from the table:
select * from columnlayoutitem limit 3; id | columnlayout | fieldidentifier | horizontalposition -------+--------------+-----------------+-------------------- 10300 | 10000 | issuetype | 0 10301 | 10000 | issuekey | 1 10302 | 10000 | summary | 2
Indexes:
\d columnlayoutitem Table "public.columnlayoutitem" Column | Type | Modifiers --------------------+------------------------+----------- id | numeric(18,0) | not null columnlayout | numeric(18,0) | fieldidentifier | character varying(255) | horizontalposition | numeric(18,0) | Indexes: "pk_columnlayoutitem" PRIMARY KEY, btree (id) "idx_cli_fieldidentifier" btree (fieldidentifier)
columnlayout is being used during data loading:
com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager#transformToColumnLayoutItems ... final List<GenericValue> columnLayoutItemGVs = ofBizDelegator.getRelated("ChildColumnLayoutItem", columnLayoutGV, ImmutableList.of("horizontalposition ASC"));
Suggested Solution
Add index for columnlayout column
CREATE INDEX [IX_columnlayoutitem_COLUMNLAYOUT] ON [jiraDB].[dbo].[columnlayoutitem] ([COLUMNLAYOUT])
Workaround
Add index manually