mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-28 10:06:47 +00:00
6 lines
382 B
SQL
6 lines
382 B
SQL
-- Speeds up the orphan-artist prune's freshness check: the prune keeps the
|
|
-- freshest getArtists pass per server (MAX(synced_at)) and deletes stale rows
|
|
-- below it. Without this index that lookup scans every artist row for the
|
|
-- server on each sync; the composite index turns it into a seek + range.
|
|
CREATE INDEX IF NOT EXISTS idx_artist_synced ON artist(server_id, synced_at);
|