From: Kaj-Michael Lang Date: Fri, 6 Jun 2008 11:16:21 +0000 (+0300) Subject: Set some special sqlite pragmas to speed up import X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28120aa6aafde4f3b4e5cc26a9cd3e2376c1cd4b;p=mapper Set some special sqlite pragmas to speed up import --- diff --git a/src/osm-db-import.c b/src/osm-db-import.c index cec035b..45aa325 100644 --- a/src/osm-db-import.c +++ b/src/osm-db-import.c @@ -1754,6 +1754,12 @@ if (db_connect(&db, database)!=TRUE) { return FALSE; } +/* Set some sqlite PRAGMAs to speed up import */ +sqlite3_exec(db, "PRAGMA cache_size=16000;", NULL, NULL, NULL); +sqlite3_exec(db, "PRAGMA locking_mode=EXCLUSIVE;", NULL, NULL, NULL); +sqlite3_exec(db, "PRAGMA journal_mode=PERSIST;", NULL, NULL, NULL); +sqlite3_exec(db, "PRAGMA synchronous=OFF;", NULL, NULL, NULL); + if (!osm_db_create(db)) { g_printerr("Failed to create osm tables or indexes\n"); return FALSE;