Skip to content

Drop index_deployments_on_project_id_sha

What does this MR do and why?

This is part of an epic to optimize the deployments table by dropping unused indexes: &10185

MR to drop the index asynchronously: !125246 (merged)

Issue: #402512 (closed)

Screenshots or screen recordings

Migration output:

main: == [advisory_lock_connection] object_id: 223880, pg_backend_pid: 17729
main: == 20230712054057 DropIndexDeploymentsOnProjectIdSha: migrating ===============
main: -- transaction_open?()
main:    -> 0.0000s
main: -- view_exists?(:postgres_partitions)
main:    -> 0.0866s
main: -- indexes(:deployments)
main:    -> 0.0214s
main: -- execute("SET statement_timeout TO 0")
main:    -> 0.0005s
main: -- remove_index(:deployments, {:algorithm=>:concurrently, :name=>"index_deployments_on_project_id_sha"})
main:    -> 0.0055s
main: -- execute("RESET statement_timeout")
main:    -> 0.0003s
main: == 20230712054057 DropIndexDeploymentsOnProjectIdSha: migrated (0.1471s) ======

main: == [advisory_lock_connection] object_id: 223880, pg_backend_pid: 17729

Check that the index no longer exists on production DB

Screenshot_2023-08-10_at_15.18.04

How to set up and validate locally

N/A

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #402512 (closed)

Edited by Pam Artiaga

Merge request reports