Fix query performance for /sync (#12745)

This commit is contained in:
Erik Johnston authored and GitHub committed 2022-05-16 16:30:35 +01:00
1 parent 6f04ae7033
commit 4ea546067d
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -0,0 +1 @@
Fix DB performance regression introduced in v1.59.0rc2.
+1 -1
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
"""