Commit d366c192 authored by allison.browne's avatar allison.browne

Add index on issue status for Zoom Meetings table

A new index on issue status should improve the perf of
ZoomMeeting.added_to_issue not that we are using that
query without filtering by issue_id
parent 9f4864ff
# frozen_string_literal: true
class AddIndexToZoomMeetings < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :zoom_meetings, :issue_status
end
def down
remove_index(:zoom_meetings, :issue_status) if index_exists?(:zoom_meetings, :issue_status)
end
end
......@@ -10,7 +10,11 @@
#
# It's strongly recommended that you check this file into your version control system.
<<<<<<< HEAD
ActiveRecord::Schema.define(version: 2019_10_26_124116) do
=======
ActiveRecord::Schema.define(version: 2019_10_24_134020) do
>>>>>>> Add index on issue status for Zoom Meetings table
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
......@@ -4041,6 +4045,7 @@ ActiveRecord::Schema.define(version: 2019_10_26_124116) do
t.string "url", limit: 255
t.index ["issue_id", "issue_status"], name: "index_zoom_meetings_on_issue_id_and_issue_status", unique: true, where: "(issue_status = 1)"
t.index ["issue_id"], name: "index_zoom_meetings_on_issue_id"
t.index ["issue_status"], name: "index_zoom_meetings_on_issue_status"
t.index ["project_id"], name: "index_zoom_meetings_on_project_id"
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment