tracker r1630 - in branches/indexer-split: . src/libtracker-db



Author: carlosg
Date: Tue Jun 10 15:12:22 2008
New Revision: 1630
URL: http://svn.gnome.org/viewvc/tracker?rev=1630&view=rev

Log:
2008-06-10  Carlos Garnacho  <carlos imendio com>

        * src/libtracker-db/tracker-db-manager.c (db_interface_get): Run
        "analyze" here, before actually attaching any database. This prevents
        sqlite from blocking when running this command after having attached a
        database.
        (db_interface_get_common) (db_interface_get_cache)
        (db_interface_get_file_metadata) (db_interface_get_file_contents)
        (db_interface_get_email_metadata) (db_interface_get_email_contents)
        (db_interface_get_xesam): Do not analyze the DB here. It's already
        done in db_interface_get().


Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/src/libtracker-db/tracker-db-manager.c

Modified: branches/indexer-split/src/libtracker-db/tracker-db-manager.c
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-manager.c	(original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-manager.c	Tue Jun 10 15:12:22 2008
@@ -1544,6 +1544,8 @@
 			       dbs[type].add_functions);
 	}
 
+	db_exec_no_reply (iface, "ANALYZE");
+
 	if (attach_all) {
 		g_message ("  Attaching to current DB connection");
 		db_exec_no_reply (iface, 
@@ -1583,8 +1585,6 @@
 		load_metadata_file (iface, "email.metadata");
 		load_metadata_file (iface, "image.metadata");
 		load_metadata_file (iface, "video.metadata");
-
-		db_exec_no_reply (iface, "ANALYZE");
 	}
 
 	/* Load static data into tracker ontology */
@@ -1605,8 +1605,6 @@
 
 	if (create) {
 		load_sql_file (iface, "sqlite-cache.sql", NULL);
-
-		db_exec_no_reply (iface, "ANALYZE");
 	}
 
 	return iface;
@@ -1625,8 +1623,6 @@
 	if (create) {
 		load_sql_file (iface, "sqlite-service.sql", NULL);
 		load_sql_file (iface, "sqlite-service-triggers.sql", "!");
-
-		db_exec_no_reply (iface, "ANALYZE");
 	}
 
 	return iface;
@@ -1644,8 +1640,6 @@
 
 	if (create) {
 		load_sql_file (iface, "sqlite-contents.sql", NULL);
-
-		db_exec_no_reply (iface, "ANALYZE");
 	}
 
 	tracker_db_interface_sqlite_create_function (iface, 
@@ -1673,8 +1667,6 @@
 		load_sql_file (iface, "sqlite-service.sql", NULL);
 		load_sql_file (iface, "sqlite-email.sql", NULL);
 		load_sql_file (iface, "sqlite-service-triggers.sql", "!");
-
-		db_exec_no_reply (iface, "ANALYZE");
 	}
 
 	return iface;
@@ -1692,8 +1684,6 @@
 
 	if (create) {
 		load_sql_file (iface, "sqlite-contents.sql", NULL);
-
-		db_exec_no_reply (iface, "ANALYZE");
 	}
 
 	tracker_db_interface_sqlite_create_function (iface, 
@@ -1915,8 +1905,6 @@
 		load_service_file_xesam (iface, "xesam-metadata.mmapping");
 		
 		db_xesam_create_lookup (iface);
-
-		db_exec_no_reply (iface, "ANALYZE");
 	}
 
 	return iface;



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