summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-07-20 10:18:09 +0100
committerErik Johnston <erik@matrix.org>2016-07-20 10:18:09 +0100
commitf91faf09b30bf3d6b2997d3a147df23d4460b7fa (patch)
tree2db913b0c3e532a56a0ddede970e066590e0a3a1 /synapse/storage
parentAdd filter param to /messages API (diff)
downloadsynapse-f91faf09b30bf3d6b2997d3a147df23d4460b7fa.tar.xz
Comment
Diffstat (limited to '')
-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 "", []