diff --git a/src/db-sql-sqlite2.c b/src/db-sql-sqlite2.c index 960c1133..04365157 100644 --- a/src/db-sql-sqlite2.c +++ b/src/db-sql-sqlite2.c @@ -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)"); diff --git a/src/db-sql-sqlite3.c b/src/db-sql-sqlite3.c index 67c9a83a..3903b4df 100644 --- a/src/db-sql-sqlite3.c +++ b/src/db-sql-sqlite3.c @@ -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 "