-
- Downloads
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
Showing
- app/models/environment.rb 1 addition, 3 deletionsapp/models/environment.rb
- changelogs/unreleased/reoganize-deployment-indexes.yml 5 additions, 0 deletionschangelogs/unreleased/reoganize-deployment-indexes.yml
- db/migrate/20170918222253_reorganize_deployments_indexes.rb 28 additions, 0 deletionsdb/migrate/20170918222253_reorganize_deployments_indexes.rb
- db/migrate/20170918223303_add_deployments_index_for_last_deployment.rb 21 additions, 0 deletions...170918223303_add_deployments_index_for_last_deployment.rb
- db/schema.rb 3 additions, 2 deletionsdb/schema.rb
Please register or sign in to comment