summary refs log tree commit diff
path: root/synapse/storage/roommember.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-30 18:32:03 +0100
committerErik Johnston <erik@matrix.org>2015-04-30 18:32:03 +0100
commit6ead27dddab13df042d8da4bbf64a10068358c3a (patch)
tree1faecc568a442146f22b8e71b2728ee854b4d515 /synapse/storage/roommember.py
parentFix up get_current_state and get_room_name_and_aliases queries to parse event... (diff)
downloadsynapse-6ead27dddab13df042d8da4bbf64a10068358c3a.tar.xz
Add more conditions on JOINs to make postgres go a little 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 831169e220..2952c62f20 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -212,7 +212,7 @@ class RoomMemberStore(SQLBaseStore):
         sql = (
             "SELECT m.* FROM room_memberships as m"
             " INNER JOIN current_state_events as c"
-            " ON m.event_id = c.event_id"
+            " ON m.event_id = c.event_id AND m.room_id = c.room_id "
             " WHERE %(where)s"
         ) % {
             "where": where_clause,