Sqlite pragma tuning for formhistory and history

This commit is contained in:
Alexander Butenko 2012-02-16 15:32:41 -04:00 committed by Christian Dywan
parent 29d6de3c6e
commit 69c319d62a
2 changed files with 8 additions and 1 deletions

View file

@ -531,6 +531,10 @@ formhistory_activate_cb (MidoriExtension* extension,
"forms (domain text, field text, value text)", "forms (domain text, field text, value text)",
NULL, NULL, &errmsg) == SQLITE_OK)) NULL, NULL, &errmsg) == SQLITE_OK))
{ {
sqlite3_exec (db,
/* "PRAGMA synchronous = OFF; PRAGMA temp_store = MEMORY" */
"PRAGMA count_changes = OFF; PRAGMA journal_mode = TRUNCATE;",
NULL, NULL, &errmsg);
priv->db = db; priv->db = db;
} }
else else

View file

@ -441,7 +441,10 @@ midori_history_initialize (KatzeArray* array,
return FALSE; return FALSE;
} }
sqlite3_exec (db, "PRAGMA journal_mode = TRUNCATE;", NULL, NULL, errmsg); sqlite3_exec (db,
/* "PRAGMA synchronous = OFF; PRAGMA temp_store = MEMORY" */
"PRAGMA count_changes = OFF; PRAGMA journal_mode = TRUNCATE;",
NULL, NULL, errmsg);
if (*errmsg) if (*errmsg)
{ {
g_warning ("Failed to set journal mode: %s", *errmsg); g_warning ("Failed to set journal mode: %s", *errmsg);