Remove index_deployments_on_project_id_and_status asynchronously
What does this MR do and why?
This is part of an epic to optimize the deployments table by removing unused indexes: &10185
This MR is an asynchronous removal migration for index_deployments_on_project_id_and_status
. The sync index removal will be done in a follow-up MR.
The definition of this index is:
"index_deployments_on_project_id_and_status" btree (project_id, status)
This index has a usage rate of 3.2689692699094675
, but this is a duplicate of index_deployments_on_project_id_and_status_and_created_at
and should be okay to remove. For more details, please read the issue description: #403595 (closed)
Screenshots or screen recordings
Migration output
main: == [advisory_lock_connection] object_id: 223440, pg_backend_pid: 90701
main: == 20230704044541 PrepareRemovalIndexDeploymentsOnProjectIdAndStatus: migrating
main: -- index_exists?(:deployments, [:project_id, :status], {:name=>"index_deployments_on_project_id_and_status"})
main: -> 0.0937s
main: -- quote_column_name("index_deployments_on_project_id_and_status")
main: -> 0.0000s
main: == 20230704044541 PrepareRemovalIndexDeploymentsOnProjectIdAndStatus: migrated (0.1095s)
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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #403595 (closed)
Edited by Pam Artiaga