Commit eb591fb9 authored by Tiger Watson's avatar Tiger Watson

Merge branch '337400-create-new-index-on-issues-1' into 'master'

Add a new index "index_issues_on_project_id_and_state_id_and_created_at_and_id"

See merge request gitlab-org/gitlab!67304
parents 4c067044 49aed743
# frozen_string_literal: true
class AddIndexIssuesOnProjectIdAndStateIdAndCreatedAtAndId < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_issues_on_project_id_and_state_id_and_created_at_and_id'
disable_ddl_transaction!
def up
add_concurrent_index :issues, [:project_id, :state_id, :created_at, :id], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :issues, INDEX_NAME
end
end
1b55c50a9ba085ae7a0552da4985755c67eafb74e76b06590179803b4b215f81
\ No newline at end of file
......@@ -24177,6 +24177,8 @@ CREATE UNIQUE INDEX index_issues_on_project_id_and_external_key ON issues USING
CREATE UNIQUE INDEX index_issues_on_project_id_and_iid ON issues USING btree (project_id, iid);
CREATE INDEX index_issues_on_project_id_and_state_id_and_created_at_and_id ON issues USING btree (project_id, state_id, created_at, id);
CREATE INDEX index_issues_on_project_id_and_upvotes_count ON issues USING btree (project_id, upvotes_count);
CREATE INDEX index_issues_on_promoted_to_epic_id ON issues USING btree (promoted_to_epic_id) WHERE (promoted_to_epic_id IS NOT NULL);
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