A platform for community discussion. Free, open, simple.
PERF: Remove redundant post_timings_summary index (#14164)
Daniel Waterworthd11f19f09928
diff --git a/app/models/post_timing.rb b/app/models/post_timing.rbindex 2670f3d020a..e272d7f08d3 100644--- a/app/models/post_timing.rb+++ b/app/models/post_timing.rb@@ -225,6 +225,5 @@ end# Indexes## index_post_timings_on_user_id (user_id)-# post_timings_summary (topic_id,post_number)# post_timings_unique (topic_id,post_number,user_id) UNIQUE#diff --git a/db/migrate/20210824203421_remove_post_timings_summary_index.rb b/db/migrate/20210824203421_remove_post_timings_summary_index.rbnew file mode 100644index 00000000000..856a89e7d0c--- /dev/null+++ b/db/migrate/20210824203421_remove_post_timings_summary_index.rb@@ -0,0 +1,7 @@+# frozen_string_literal: true++class RemovePostTimingsSummaryIndex < ActiveRecord::Migration[6.1]+ def change+ remove_index :post_timings, column: [:topic_id, :post_number], name: :post_timings_summary, if_exists: true+ end+end