Add index for ci_runners.locked, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12571602 and https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12571670
This commit is contained in:
parent
4efc1c4a68
commit
c628eeb773
2 changed files with 14 additions and 1 deletions
12
db/migrate/20160620115026_add_index_on_runners_locked.rb
Normal file
12
db/migrate/20160620115026_add_index_on_runners_locked.rb
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
|
||||||
|
# for more information on how to write migrations for GitLab.
|
||||||
|
|
||||||
|
class AddIndexOnRunnersLocked < ActiveRecord::Migration
|
||||||
|
include Gitlab::Database::MigrationHelpers
|
||||||
|
|
||||||
|
disable_ddl_transaction!
|
||||||
|
|
||||||
|
def change
|
||||||
|
add_concurrent_index :ci_runners, :locked
|
||||||
|
end
|
||||||
|
end
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20160616084004) do
|
ActiveRecord::Schema.define(version: 20160620115026) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
@ -291,6 +291,7 @@ ActiveRecord::Schema.define(version: 20160616084004) do
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "ci_runners", ["description"], name: "index_ci_runners_on_description_trigram", using: :gin, opclasses: {"description"=>"gin_trgm_ops"}
|
add_index "ci_runners", ["description"], name: "index_ci_runners_on_description_trigram", using: :gin, opclasses: {"description"=>"gin_trgm_ops"}
|
||||||
|
add_index "ci_runners", ["locked"], name: "index_ci_runners_on_locked", using: :btree
|
||||||
add_index "ci_runners", ["token"], name: "index_ci_runners_on_token", using: :btree
|
add_index "ci_runners", ["token"], name: "index_ci_runners_on_token", using: :btree
|
||||||
add_index "ci_runners", ["token"], name: "index_ci_runners_on_token_trigram", using: :gin, opclasses: {"token"=>"gin_trgm_ops"}
|
add_index "ci_runners", ["token"], name: "index_ci_runners_on_token_trigram", using: :gin, opclasses: {"token"=>"gin_trgm_ops"}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue