From 4c8f11555e6ef7369f9771cf2c59c46e33e07e14 Mon Sep 17 00:00:00 2001 From: theguardian Date: Wed, 23 Oct 2013 21:34:12 -0700 Subject: [PATCH] Added database indices on allalbums/alltracks tables. Active artist update FLIES throughout the process when starting from scratch. --- headphones/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/headphones/__init__.py b/headphones/__init__.py index d99bf819..2dd83f7b 100644 --- a/headphones/__init__.py +++ b/headphones/__init__.py @@ -953,6 +953,9 @@ def dbcheck(): c.execute('CREATE TABLE IF NOT EXISTS releases (ReleaseID TEXT, ReleaseGroupID TEXT, UNIQUE(ReleaseID, ReleaseGroupID))') c.execute('CREATE INDEX IF NOT EXISTS tracks_albumid ON tracks(AlbumID ASC)') c.execute('CREATE INDEX IF NOT EXISTS album_artistid_reldate ON albums(ArtistID ASC, ReleaseDate DESC)') + c.execute('CREATE INDEX IF NOT EXISTS alltracks_relid ON alltracks(ReleaseID ASC, TrackID ASC)') + c.execute('CREATE INDEX IF NOT EXISTS allalbums_relid ON allalbums(ReleaseID ASC)') + c.execute('CREATE INDEX IF NOT EXISTS have_location ON have(Location ASC)') try: c.execute('SELECT IncludeExtras from artists')