diff --git a/src/db.c b/src/db.c index 488cd660..c34b200b 100644 --- a/src/db.c +++ b/src/db.c @@ -3975,6 +3975,21 @@ db_perthread_deinit(void) #define I_STATEMKINDSAI \ "CREATE INDEX IF NOT EXISTS idx_state_mkind_sai ON files(disabled, media_kind, songalbumid);" +#define I_ARTIST \ + "CREATE INDEX IF NOT EXISTS idx_artist ON files(artist, artist_sort);" + +#define I_ALBUMARTIST \ + "CREATE INDEX IF NOT EXISTS idx_albumartist ON files(album_artist, album_artist_sort);" + +#define I_COMPOSER \ + "CREATE INDEX IF NOT EXISTS idx_composer ON files(composer, composer_sort);" + +#define I_TITLE \ + "CREATE INDEX IF NOT EXISTS idx_title ON files(title, title_sort);" + +#define I_ALBUM \ + "CREATE INDEX IF NOT EXISTS idx_album ON files(album, album_sort);" + #define I_FILEPATH \ "CREATE INDEX IF NOT EXISTS idx_filepath ON playlistitems(filepath ASC);" @@ -4045,6 +4060,12 @@ static const struct db_init_query db_init_queries[] = { I_SONGALBUMID, "create songalbumid index" }, { I_STATEMKINDSAI, "create state/mkind/sai index" }, + { I_ARTIST, "create artist index" }, + { I_ALBUMARTIST, "create album_artist index" }, + { I_COMPOSER, "create composer index" }, + { I_TITLE, "create title index" }, + { I_ALBUM, "create album index" }, + { I_FILEPATH, "create file path index" }, { I_PLITEMID, "create playlist id index" }, { I_PAIRING, "create pairing guid index" },