create indexes for ID and VERSION on MANIFESTS table to reduce the

time it takes to lookup whether BARs are interesting.
This commit is contained in:
gardners 2013-02-15 17:08:51 +10:30 committed by Jeremy Lakeman
parent 17ea1b69b3
commit 8befcf7c11

View File

@ -287,6 +287,12 @@ int rhizome_opendb()
verify_bundles();
sqlite_exec_void_loglevel(LOG_LEVEL_WARN, "PRAGMA user_version=2;");
}
if (version<3){
sqlite_exec_void_loglevel(LOG_LEVEL_WARN, "CREATE INDEX IF NOT EXISTS IDX_MANIFESTS_ID_VERSION ON MANIFESTS(id, version);");
sqlite_exec_void_loglevel(LOG_LEVEL_WARN, "PRAGMA user_version=3;");
}
// TODO recreate tables with collate nocase on hex columns
/* Future schema updates should be performed here.