mirror of
https://github.com/element-hq/synapse
synced 2024-10-02 08:02:41 +00:00
Join both tables with stream_ordering
This commit is contained in:
parent
62c6a4e860
commit
39259f66fa
1 changed files with 1 additions and 1 deletions
|
@ -831,7 +831,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
|
|||
e.sender
|
||||
FROM current_state_delta_stream AS s
|
||||
INNER JOIN events AS e ON e.stream_ordering = s.stream_id
|
||||
INNER JOIN room_memberships AS m ON m.event_id = e.event_id
|
||||
INNER JOIN room_memberships AS m ON m.event_stream_ordering = s.stream_id
|
||||
WHERE m.user_id = ?
|
||||
AND s.stream_id > ? AND s.stream_id <= ?
|
||||
ORDER BY s.stream_id ASC
|
||||
|
|
Loading…
Reference in a new issue