Commit 772fee38 authored by Alina Mihaila's avatar Alina Mihaila Committed by Andreas Brandl

Remove redundant index on creator_id and created_at from projects

parent 9bf7a9ba
---
title: Remove redundant index from projects table
merge_request: 29507
author:
type: performance
# frozen_string_literal: true
class RemoveIndexProjectsOnCreatorIdAndCreatedAtFromProjects < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_projects_on_creator_id_and_created_at'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name :projects, INDEX_NAME
end
def down
add_concurrent_index :projects, [:creator_id, :created_at], name: INDEX_NAME
end
end
......@@ -9927,8 +9927,6 @@ CREATE INDEX index_projects_api_vis20_updated_at ON public.projects USING btree
CREATE INDEX index_projects_on_created_at_and_id ON public.projects USING btree (created_at, id);
CREATE INDEX index_projects_on_creator_id_and_created_at ON public.projects USING btree (creator_id, created_at);
CREATE INDEX index_projects_on_creator_id_and_created_at_and_id ON public.projects USING btree (creator_id, created_at, id);
CREATE INDEX index_projects_on_creator_id_and_id ON public.projects USING btree (creator_id, id);
......@@ -13178,6 +13176,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200408175424
20200409211607
20200410232012
20200414144547
20200415160722
20200415161021
20200415161206
......
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