From efcd463946edf739420b9708658db552fa2bf735 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sun, 26 Jun 2011 16:20:31 +0200 Subject: [PATCH] Add indexes for playlists --- src/db.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/db.c b/src/db.c index f9a4d1dd..6517188d 100644 --- a/src/db.c +++ b/src/db.c @@ -3990,6 +3990,12 @@ db_perthread_deinit(void) #define I_ALBUM \ "CREATE INDEX IF NOT EXISTS idx_album ON files(album, album_sort);" +#define I_PL_PATH \ + "CREATE INDEX IF NOT EXISTS idx_pl_path ON playlists(path);" + +#define I_PL_DISABLED \ + "CREATE INDEX IF NOT EXISTS idx_pl_disabled ON playlists(disabled);" + #define I_FILEPATH \ "CREATE INDEX IF NOT EXISTS idx_filepath ON playlistitems(filepath ASC);" @@ -4069,6 +4075,9 @@ static const struct db_init_query db_init_queries[] = { I_TITLE, "create title index" }, { I_ALBUM, "create album index" }, + { I_PL_PATH, "create playlist path index" }, + { I_PL_DISABLED, "create playlist state index" }, + { I_FILEPATH, "create file path index" }, { I_PLITEMID, "create playlist id index" },