summary refs log tree commit diff
path: root/synapse/storage/roommember.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-02-01 11:44:27 +0000
committerGitHub <noreply@github.com>2017-02-01 11:44:27 +0000
commit88a4d54883d64c8059cde1f8215d7e97644dac85 (patch)
treede27b029701026f1333589aea838e0fe0ba078c6 /synapse/storage/roommember.py
parentUp get_latest_event_ids_in_room cache (diff)
parentAdd an index to make membership queries faster (diff)
downloadsynapse-88a4d54883d64c8059cde1f8215d7e97644dac85.tar.xz
Merge pull request #1867 from matrix-org/erikj/member_index
Add an index to make membership queries faster
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r--synapse/storage/roommember.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index 0fdcf29085..10f7c7a4bc 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -220,7 +220,7 @@ class RoomMemberStore(SQLBaseStore):
                 " ON e.event_id = c.event_id"
                 " AND m.room_id = c.room_id"
                 " AND m.user_id = c.state_key"
-                " WHERE %s"
+                " WHERE c.type = 'm.room.member' AND %s"
             ) % (where_clause,)
 
             txn.execute(sql, args)