Commit graph

1 commit

Author SHA1 Message Date
Yorick Peterse
05a8f401c2
Reorganize indexes for the "deployments" table
This removes the need for a default scope that adds a "WHERE project_id
= X" clause. This commit also includes an additional index for
Environment#last_deployment, ensuring this query uses just an index scan
instead of also applying a Filter.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36877
2017-09-19 00:39:52 +02:00