Remove index_deployments_on_id_where_cluster_id_present 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_id_where_cluster_id_present
. This index has a usage rate of 0
.
The definition of this index is:
CREATE INDEX index_deployments_on_id_where_cluster_id_present ON deployments USING btree (id) WHERE (cluster_id IS NOT NULL);
The sync index removal will be done in a follow-up MR, as part of #402510 (closed)
Screenshots or screen recordings
Migration output
main: == [advisory_lock_connection] object_id: 225060, pg_backend_pid: 56549
main: == 20230818055517 PrepareRemovalIndexDeploymentsOnIdWhereClusterIdPresent: migrating
main: -- index_exists?(:deployments, :id, {:name=>"index_deployments_on_id_where_cluster_id_present"})
main: -> 0.0904s
main: -- quote_column_name("index_deployments_on_id_where_cluster_id_present")
main: -> 0.0000s
main: == 20230818055517 PrepareRemovalIndexDeploymentsOnIdWhereClusterIdPresent: migrated (0.1075s)
main: == [advisory_lock_connection] object_id: 225060, pg_backend_pid: 56549
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
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 #402510 (closed)
Edited by Pam Artiaga