Fix query performance for /sync

Broke in #12729.
pull/13598/head
Erik Johnston 2022-05-16 15:43:00 +01:00 committed by David Robertson
parent 7b83ac8675
commit 771d2041cd
No known key found for this signature in database
GPG Key ID: 903ECE108A39DEDD
1 changed files with 1 additions and 1 deletions

View File

@ -750,7 +750,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
WHERE room_id = ?
AND stream_ordering <= ?
AND NOT outlier
AND rejections.reason IS NULL
AND rejections.event_id IS NULL
ORDER BY stream_ordering DESC
LIMIT 1
"""