diff --git a/synapse/storage/databases/main/event_federation.py b/synapse/storage/databases/main/event_federation.py index 1f35063e9f..20bc258b75 100644 --- a/synapse/storage/databases/main/event_federation.py +++ b/synapse/storage/databases/main/event_federation.py @@ -355,6 +355,10 @@ class EventFederationWorkerStore(SignatureWorkerStore, EventsWorkerStore, SQLBas # structuring the recursive part of query to pull out the links without # also returning large quantities of redundant data (which can make it a # lot slower). + + txn.execute("SET LOCAL jit = off") + txn.execute("SET LOCAL enable_seqscan = off") + sql = """ WITH RECURSIVE links(chain_id) AS ( SELECT