1) When moving an issue between projects or bulk moving multiples issues, we can observe that the query below consumes much of the active connection pool and db cpu.
- Report from DB:
"SELECT OLD_ISSUE_KEY FROM moved_issue_key WHERE ISSUE_ID=:1 ORDER BY ID"
Id Operation Name Rows Bytes Cost (%CPU) Time 0 SELECT STATEMENT 84 (100) 1 SORT ORDER BY 1 21 84 (3) 00:00:01 2 TABLE ACCESS FULL MOVED_ISSUE_KEY 1 21 83 (2) 00:00:01
- Query is doing full table scans and scanning more than 4 lac rows for every execution.
- moved_issue_key table structure:
2) Customers facing issue JSWSERVER-20612 Dev.Status can get stuck paging over issue updates from Bitbucket Server, Bamboo or Fecru and cause excessive load on database can minimize the DB impact by adding this index:
Add an index on the issue_id column for the table moved_issue_key?
Add index manually