summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeif Lotfy <seif@lotfy.com>2012-06-02 16:35:20 +0200
committerSeif Lotfy <seif@lotfy.com>2012-06-02 16:35:20 +0200
commit628ffefe491a175575922a07a28a33b5f42bb581 (patch)
tree512d44c8028a3bd10007430ed791684ef761014a
parentfdb9bfeb9cc346a430ebf2093a62c951693d9ca6 (diff)
downloadzeitgeist-optimizations2.tar.gz
Optimize the indexes by adding subj_interpretation to the end of subj_idoptimizations2
-rw-r--r--src/sql-schema.vala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sql-schema.vala b/src/sql-schema.vala
index 5bd9d783..71200f23 100644
--- a/src/sql-schema.vala
+++ b/src/sql-schema.vala
@@ -454,27 +454,27 @@ namespace Zeitgeist.SQLite
exec_query (database, """DROP INDEX IF EXISTS event_subj_id""");
exec_query (database, """
CREATE INDEX IF NOT EXISTS event_subj_id
- ON event(subj_id, timestamp)
+ ON event(subj_id, timestamp, subj_interpretation)
""");
exec_query (database, """DROP INDEX IF EXISTS event_subj_id_current""");
exec_query (database, """
CREATE INDEX IF NOT EXISTS event_subj_id_current
- ON event(subj_id_current, timestamp)
+ ON event(subj_id_current, timestamp, subj_interpretation)
""");
exec_query (database, """DROP INDEX IF EXISTS event_subj_interpretation""");
exec_query (database, """
CREATE INDEX IF NOT EXISTS event_subj_interpretation
- ON event(subj_interpretation,timestamp)
+ ON event(subj_interpretation, timestamp, subj_id)
""");
exec_query (database, """DROP INDEX IF EXISTS event_subj_manifestation""");
exec_query (database, """
CREATE INDEX IF NOT EXISTS event_subj_manifestation
- ON event(subj_manifestation, timestamp)
+ ON event(subj_manifestation, timestamp, subj_id)
""");
exec_query (database, """DROP INDEX IF EXISTS event_subj_origin""");
exec_query (database, """
CREATE INDEX IF NOT EXISTS event_subj_origin
- ON event(subj_origin, timestamp)
+ ON event(subj_origin, timestamp, subj_interpretation, subj_id)
""");
exec_query (database, """DROP INDEX IF EXISTS event_subj_mimetype""");
exec_query (database, """