[rygel] media-export: Speed up startup-filesystem walk
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Speed up startup-filesystem walk
- Date: Sat, 14 Aug 2010 23:33:06 +0000 (UTC)
commit dab065ba76afc771b430c9c6e48d6a169b22d3e8
Author: Jens Georg <mail jensge org>
Date: Sat Aug 14 16:43:02 2010 +0300
media-export: Speed up startup-filesystem walk
.../rygel-media-export-sql-factory.vala | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-sql-factory.vala b/src/plugins/media-export/rygel-media-export-sql-factory.vala
index 3ef1a61..444b0fe 100644
--- a/src/plugins/media-export/rygel-media-export-sql-factory.vala
+++ b/src/plugins/media-export/rygel-media-export-sql-factory.vala
@@ -143,7 +143,7 @@ internal class Rygel.MediaExport.SQLFactory : Object {
"SELECT COUNT(upnp_id) FROM Object WHERE Object.parent = ?";
private const string OBJECT_EXISTS_STRING =
- "SELECT COUNT(upnp_id), timestamp, m.size FROM Object " +
+ "SELECT COUNT(1), timestamp, m.size FROM Object " +
"JOIN meta_data m ON m.object_fk = upnp_id " +
"WHERE Object.uri = ?";
@@ -226,7 +226,8 @@ internal class Rygel.MediaExport.SQLFactory : Object {
private const string CREATE_INDICES_STRING =
"CREATE INDEX idx_parent on Object(parent);" +
"CREATE INDEX idx_meta_data_fk on meta_data(object_fk);" +
- "CREATE INDEX idx_closure on Closure(descendant,depth);";
+ "CREATE INDEX idx_closure on Closure(descendant,depth);" +
+ "CREATE INDEX idx_uri on Object(uri);";
public unowned string make (SQLString query) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]