mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-11 15:03:24 -05:00
Add database/quick_startup directive to specify that the database should start up quickly -- without vacuum in the case of sqlite
This commit is contained in:
parent
e0ff0c794e
commit
6d54f3c826
@ -321,7 +321,9 @@ int db_sqlite2_event(int event_type) {
|
||||
switch(event_type) {
|
||||
|
||||
case DB_SQL_EVENT_STARTUP: /* this is a startup with existing songs */
|
||||
db_sqlite2_exec(NULL,E_FATAL,"vacuum");
|
||||
if(!conf_get_int("database","quick_startup",0))
|
||||
db_sqlite2_exec(NULL,E_FATAL,"vacuum");
|
||||
|
||||
/* make sure our indexes exist */
|
||||
db_sqlite2_exec(NULL,E_DBG,"create index idx_path on "
|
||||
"songs(path,idx)");
|
||||
|
@ -356,7 +356,9 @@ int db_sqlite3_event(int event_type) {
|
||||
switch(event_type) {
|
||||
|
||||
case DB_SQL_EVENT_STARTUP: /* this is a startup with existing songs */
|
||||
db_sqlite3_exec(NULL,E_FATAL,"vacuum");
|
||||
if(!conf_get_int("database","quick_startup",0))
|
||||
db_sqlite3_exec(NULL,E_FATAL,"vacuum");
|
||||
|
||||
db_sqlite3_exec(NULL,E_DBG,"create index idx_path on "
|
||||
"songs(path,idx)");
|
||||
db_sqlite3_exec(NULL,E_DBG,"create index idx_songid on "
|
||||
|
Loading…
Reference in New Issue
Block a user