summary refs log tree commit diff
path: root/synapse/storage/schema/full_schemas
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-15 11:43:25 +0100
committerErik Johnston <erik@matrix.org>2015-04-15 11:43:25 +0100
commitcce5d057d34ac6fc953d1987bbce3bce2ce42bd8 (patch)
tree562e2e441bb6bca2694eb76578f46827749a68e8 /synapse/storage/schema/full_schemas
parentMerge branch 'develop' of github.com:matrix-org/synapse into postgres (diff)
downloadsynapse-cce5d057d34ac6fc953d1987bbce3bce2ce42bd8.tar.xz
Add index on events (topological_ordering, stream_ordering) to help with ORDER BY clauses
Diffstat (limited to 'synapse/storage/schema/full_schemas')
-rw-r--r--synapse/storage/schema/full_schemas/16/im.sql1
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/storage/schema/full_schemas/16/im.sql b/synapse/storage/schema/full_schemas/16/im.sql
index a661fc160c..b8faed5066 100644
--- a/synapse/storage/schema/full_schemas/16/im.sql
+++ b/synapse/storage/schema/full_schemas/16/im.sql
@@ -29,6 +29,7 @@ CREATE TABLE IF NOT EXISTS events(
 
 CREATE INDEX events_stream_ordering ON events (stream_ordering);
 CREATE INDEX events_topological_ordering ON events (topological_ordering);
+CREATE INDEX events_order ON events (topological_ordering, stream_ordering);
 CREATE INDEX events_room_id ON events (room_id);