PERF: Remove redundant post_timings_summary index (#14164)

It's redundant since post_timings_unique exists which has a superset of
the columns with the same prefix.
This commit is contained in:
Daniel Waterworth 2021-08-26 10:50:34 -05:00 committed by GitHub
parent f66217c0b3
commit d11f19f099
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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
#

View File

@ -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