-- 0060_play_events_track_index.up.sql — play_events by track (Scribe #3912, #3911). -- -- play_events is indexed by (user_id, started_at) and (user_id, track_id), both -- led by user. Nothing reached it by track alone until the duplicates report, -- which shows each copy's play count — a scan of the whole table per copy — and -- the merge (#3911), which repoints a duplicate's play history onto the copy -- being kept. Both ask "every play of this track", whoever played it. CREATE INDEX play_events_track_idx ON play_events (track_id);