From cf4f2e55995114f0835d737e977145d67a07caef Mon Sep 17 00:00:00 2001 From: Raymond Jacobson Date: Wed, 3 Jun 2026 14:34:19 -0700 Subject: [PATCH] perf(db): drop unused interval play count indexes --- .../0218_drop_unused_interval_play_count_indexes.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ddl/migrations/0218_drop_unused_interval_play_count_indexes.sql diff --git a/ddl/migrations/0218_drop_unused_interval_play_count_indexes.sql b/ddl/migrations/0218_drop_unused_interval_play_count_indexes.sql new file mode 100644 index 00000000..1c2854e1 --- /dev/null +++ b/ddl/migrations/0218_drop_unused_interval_play_count_indexes.sql @@ -0,0 +1,6 @@ +-- Production pg_stat_user_indexes showed both count-only interval play indexes +-- with zero scans. aggregate_interval_plays lookups in the API use track_id, +-- which is covered by interval_play_track_id_idx. + +drop index concurrently if exists interval_play_week_count_idx; +drop index concurrently if exists interval_play_month_count_idx;