Skip to content

Missing indexes on issue child tables #388

Description

@cavidelizade

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions