Use more-efficient indexing for the MergeRequestDiff storage migration
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.
Showing
Please register or sign in to comment