summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/stream.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index 3516636dd1..862c5c3ea1 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -96,6 +96,10 @@ def upper_bound(token, engine, inclusive=True):
 
 
 def filter_to_clause(event_filter):
+    # NB: This may create SQL clauses that don't optimise well (and we don't
+    # have indices on all possible clauses). E.g. it may create
+    # "room_id == X AND room_id != X", which postgres doesn't optimise.
+
     if not event_filter:
         return "", []