[tracker/checkpoint: 7/16] libtracker-data: Change WAL checkpoint threshold to improve performance



commit bc72b0f369e112d215ebac868e7e0cc1c2735dfb
Author: JÃrg Billeter <j bitron ch>
Date:   Thu Jun 23 13:01:28 2011 +0200

    libtracker-data: Change WAL checkpoint threshold to improve performance

 src/libtracker-data/tracker-db-manager.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index 5a86aed..d74b1dd 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -267,6 +267,10 @@ db_set_params (TrackerDBInterface   *iface,
 			g_object_unref (stmt);
 		}
 
+		/* increase WAL autocheckpoint threshold from the default of 1000 pages
+		   to 10000 pages to improve update performance */
+		tracker_db_interface_execute_query (iface, NULL, "PRAGMA wal_autocheckpoint = 10000");
+
 		if (page_size != TRACKER_DB_PAGE_SIZE_DONT_SET) {
 			g_message ("  Setting page size to %d", page_size);
 			tracker_db_interface_execute_query (iface, NULL, "PRAGMA page_size = %d", page_size);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]