• Sean McGivern's avatar
    Remove index on issues.relative_position · 20686f75
    Sean McGivern authored
    This index is only on a single column, `relative_position`. However,
    when we query issues by anything other than ID, we pretty much always do
    that with a filter on `project_id`. (The exception is an admin user
    viewing a dashboard, which is a rare case, and there aren't
    instance-level boards anyway.)
    
    We already have an index that's perfect for filtering by `project_id`
    and ordering by `relative_position`, because it's on these columns:
    
        (project_id, relative_position, state_id, id DESC)
    
    But sometimes the planner won't use it because of this index, which can
    lead to poor query performance.
    20686f75
structure.sql 924 KB