複合インデックスと重複する単独インデックスを削除 #9915 - #10344
JoeJoeflyn wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 17 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Issue
概要
複合インデックスの先頭カラムと重複する単独インデックスを11件削除しました。PostgreSQLのB-treeインデックスでは複合インデックスの先頭カラム単体での検索にも利用されるため、単独インデックスは冗長です。
削除対象
index_answers_on_question_idindex_answers_on_question_id_and_typeindex_checks_on_user_idindex_checks_on_user_id_and_checkable_id_and_checkable_typeindex_coding_test_submissions_on_coding_test_idindex_coding_test_submissions_on_coding_test_id_and_user_idindex_followings_on_follower_idindex_followings_on_follower_id_and_followed_idindex_footprints_on_user_idindex_footprintableindex_pair_work_schedules_on_pair_work_idindex_pair_work_schedules_on_pair_work_id_and_proposed_atindex_participations_on_user_idindex_participations_on_user_id_and_event_idindex_products_on_user_idindex_products_on_user_id_and_practice_idindex_regular_event_participations_on_user_idindex_user_id_and_regular_event_idindex_survey_answers_on_survey_idindex_survey_answers_on_survey_id_and_user_idindex_works_on_user_idindex_works_on_user_id_and_title変更確認方法
chore/remove-redundant-indexes-#9915をローカルに取り込むbin/rails db:migrateを実行し、エラーなく完了することを確認するbin/rails db:schema:loadでスキーマが正しく構築されることを確認するbin/rails testが全てパスすることを確認する