Summary
Several issue child tables have no index on issue_id, so every issue-detail load sequentially scans them as they grow. Same class as the module-table index fix (#366).
Where
issue_comments, issue_assignees, issue_labels, and issue_activities each get an issue_id index in migration 000001, but these siblings do not: issue_reactions, issue_subscribers, issue_mentions, issue_relations, issue_links, issue_attachments. comment_reactions also has no index on comment_id. All are loaded per issue-detail view filtered by issue_id (or comment_id).
Suggested fix
Add issue_id indexes on those tables and a comment_id index on comment_reactions, in a migration (using CREATE INDEX IF NOT EXISTS).
Summary
Several issue child tables have no index on
issue_id, so every issue-detail load sequentially scans them as they grow. Same class as the module-table index fix (#366).Where
issue_comments,issue_assignees,issue_labels, andissue_activitieseach get anissue_idindex in migration 000001, but these siblings do not:issue_reactions,issue_subscribers,issue_mentions,issue_relations,issue_links,issue_attachments.comment_reactionsalso has no index oncomment_id. All are loaded per issue-detail view filtered byissue_id(orcomment_id).Suggested fix
Add
issue_idindexes on those tables and acomment_idindex oncomment_reactions, in a migration (usingCREATE INDEX IF NOT EXISTS).