mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-09 04:38:10 -05:00
Build indexes on playlists, comment out the playlist order stuff, until further investigation
This commit is contained in:
parent
eefb9939b9
commit
679f253de8
@ -819,7 +819,11 @@ int db_sqlite_enum_start(DBQUERYINFO *pinfo) {
|
|||||||
} else {
|
} else {
|
||||||
sprintf(query_count,"SELECT COUNT(id) FROM songs ");
|
sprintf(query_count,"SELECT COUNT(id) FROM songs ");
|
||||||
|
|
||||||
#ifdef NSLU2
|
/* We need to fix playlist queries to stop
|
||||||
|
* pulling the whole song db... the performance
|
||||||
|
* of these playlist queries sucks.
|
||||||
|
*/
|
||||||
|
#if 1
|
||||||
sprintf(query_select,"select * from songs ");
|
sprintf(query_select,"select * from songs ");
|
||||||
sprintf(query_rest,"where songs.id in (select songid from playlistitems where playlistid=%d)",pinfo->playlist_id);
|
sprintf(query_rest,"where songs.id in (select songid from playlistitems where playlistid=%d)",pinfo->playlist_id);
|
||||||
#else
|
#else
|
||||||
@ -1830,6 +1834,12 @@ char *db_sqlite_upgrade_scripts[] = {
|
|||||||
"insert into playlistitems (playlistid, songid) select * from tempitems;\n"
|
"insert into playlistitems (playlistid, songid) select * from tempitems;\n"
|
||||||
"drop table tempitems;\n"
|
"drop table tempitems;\n"
|
||||||
"update config set value=7 where term='version';\n",
|
"update config set value=7 where term='version';\n",
|
||||||
|
|
||||||
|
/* version 7 -> version 8 */
|
||||||
|
"create index idx_songid on playlistitems(songid);\n"
|
||||||
|
"create index idx_playlistid on playlistitems(playlistid);\n"
|
||||||
|
"update config set value=8 where term='version';\n",
|
||||||
|
|
||||||
NULL /* No more versions! */
|
NULL /* No more versions! */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user