diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-11-07 15:59:52 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-11-07 15:59:52 +0300 |
commit | 90df732144263d058039a3846d9fe4420816efe1 (patch) | |
tree | be3e76e01c732924d0eba99a152316abcf3ffd10 /db | |
parent | 9b807a1091d7939e0b5206d6fd76a3a034d4cda4 (diff) |
Remove low selective indexes
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20181106135939_add_index_to_deployments.rb | 10 | ||||
-rw-r--r-- | db/schema.rb | 5 |
2 files changed, 0 insertions, 15 deletions
diff --git a/db/migrate/20181106135939_add_index_to_deployments.rb b/db/migrate/20181106135939_add_index_to_deployments.rb index dc9a053d21c..5f988a4723c 100644 --- a/db/migrate/20181106135939_add_index_to_deployments.rb +++ b/db/migrate/20181106135939_add_index_to_deployments.rb @@ -8,20 +8,10 @@ class AddIndexToDeployments < ActiveRecord::Migration disable_ddl_transaction! def up - add_concurrent_index :deployments, [:project_id, :status, :id] - add_concurrent_index :deployments, [:project_id, :status, :iid] add_concurrent_index :deployments, [:project_id, :status, :created_at] - add_concurrent_index :deployments, [:environment_id, :status, :id] - add_concurrent_index :deployments, [:environment_id, :status, :iid] - add_concurrent_index :deployments, [:environment_id, :sha] end def down - remove_concurrent_index :deployments, [:project_id, :status, :id] - remove_concurrent_index :deployments, [:project_id, :status, :iid] remove_concurrent_index :deployments, [:project_id, :status, :created_at] - remove_concurrent_index :deployments, [:environment_id, :status, :id] - remove_concurrent_index :deployments, [:environment_id, :status, :iid] - remove_concurrent_index :deployments, [:environment_id, :sha] end end diff --git a/db/schema.rb b/db/schema.rb index cb46083cea0..38ff735fc9e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -833,15 +833,10 @@ ActiveRecord::Schema.define(version: 20181107054254) do add_index "deployments", ["deployable_type", "deployable_id"], name: "index_deployments_on_deployable_type_and_deployable_id", using: :btree add_index "deployments", ["environment_id", "id"], name: "index_deployments_on_environment_id_and_id", using: :btree add_index "deployments", ["environment_id", "iid", "project_id"], name: "index_deployments_on_environment_id_and_iid_and_project_id", using: :btree - add_index "deployments", ["environment_id", "sha"], name: "index_deployments_on_environment_id_and_sha", using: :btree - add_index "deployments", ["environment_id", "status", "id"], name: "index_deployments_on_environment_id_and_status_and_id", using: :btree - add_index "deployments", ["environment_id", "status", "iid"], name: "index_deployments_on_environment_id_and_status_and_iid", using: :btree add_index "deployments", ["environment_id", "status"], name: "index_deployments_on_environment_id_and_status", using: :btree add_index "deployments", ["id"], name: "partial_index_deployments_for_legacy_successful_deployments", where: "((finished_at IS NULL) AND (status = 2))", using: :btree add_index "deployments", ["project_id", "iid"], name: "index_deployments_on_project_id_and_iid", unique: true, using: :btree add_index "deployments", ["project_id", "status", "created_at"], name: "index_deployments_on_project_id_and_status_and_created_at", using: :btree - add_index "deployments", ["project_id", "status", "id"], name: "index_deployments_on_project_id_and_status_and_id", using: :btree - add_index "deployments", ["project_id", "status", "iid"], name: "index_deployments_on_project_id_and_status_and_iid", using: :btree add_index "deployments", ["project_id", "status"], name: "index_deployments_on_project_id_and_status", using: :btree create_table "emails", force: :cascade do |t| |