Skip to content

Drop duplicate index on p_ci_stages

Max Orefice requested to merge morefice/drop-ci-stages-index into master

What does this MR do and why?

This MR drops p_ci_stages_pipeline_id_idx as it has been identified as a duplicated index.

We already have composite indexes including pipeline_id, this will free up ~51GB.

gitlabhq_development_ci=# \d+ p_ci_stages
Indexes:
    "p_ci_stages_pkey" PRIMARY KEY, btree (id, partition_id)
-   "p_ci_stages_pipeline_id_idx" btree (pipeline_id)
    "p_ci_stages_pipeline_id_id_idx" btree (pipeline_id, id) WHERE status = ANY (ARRAY[0, 1, 2, 8, 9, 10])
    "p_ci_stages_pipeline_id_name_partition_id_idx" UNIQUE, btree (pipeline_id, name, partition_id)
    "p_ci_stages_pipeline_id_position_idx" btree (pipeline_id, "position")
    "p_ci_stages_project_id_idx" btree (project_id)
Edited by Max Orefice

Merge request reports