Remove unnecessary index from events table
What does this MR do and why?
This change removes the index_on_events_to_improve_contribution_analytics_performance
index async from the events
table. The index takes too much disk space and it doesn't improve the contribution analytics queries significantly: #398104 (comment 1338437651)
Migration
Up:
main: == 20230601184234 DropUnnecessaryAsyncIndexFromEvents: migrating ==============
main: -- index_exists?(:events, [:project_id, :target_type, :action, :created_at, :author_id, :id], {:name=>"index_on_events_to_improve_contribution_analytics_performance"})
main: -> 0.0599s
main: -- quote_column_name("index_on_events_to_improve_contribution_analytics_performance")
main: -> 0.0001s
main: == 20230601184234 DropUnnecessaryAsyncIndexFromEvents: migrated (0.0808s) =====
ci: == 20230601184234 DropUnnecessaryAsyncIndexFromEvents: migrating ==============
ci: -- index_exists?(:events, [:project_id, :target_type, :action, :created_at, :author_id, :id], {:name=>"index_on_events_to_improve_contribution_analytics_performance"})
ci: -> 0.0111s
ci: -- quote_column_name("index_on_events_to_improve_contribution_analytics_performance")
ci: -> 0.0001s
ci: == 20230601184234 DropUnnecessaryAsyncIndexFromEvents: migrated (0.0242s) =====
Down:
main: == 20230601184234 DropUnnecessaryAsyncIndexFromEvents: reverting ==============
main: == 20230601184234 DropUnnecessaryAsyncIndexFromEvents: reverted (0.0686s) =====
ci: == 20230601184234 DropUnnecessaryAsyncIndexFromEvents: reverting ==============
ci: == 20230601184234 DropUnnecessaryAsyncIndexFromEvents: reverted (0.0828s) =====
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 #410229 (closed)
Edited by Adam Hegyi