• Nick Thomas's avatar
    Use more-efficient indexing for the MergeRequestDiff storage migration · 5d9a1326
    Nick Thomas authored
    Specifying everything that's needed in the index allows us to pluck new
    records with an index-only scan. The `files_count` encapsulates
    everything we want to know in the `when: always` case.
    
    The `when: outdated` case is probably also helped by this, but might
    need some additional indexes to help out at scale. We aren't using it
    so I haven't investigated this.
    5d9a1326
merge_request_diff_spec.rb 25.8 KB