Add an index to make membership queries faster

This commit is contained in:
Erik Johnston 2017-01-31 15:15:41 +00:00
parent ac001dabdc
commit 21b7375778
3 changed files with 26 additions and 1 deletions

View file

@ -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)