Handle SQLite

This commit is contained in:
Erik Johnston 2024-06-26 13:14:48 +01:00
parent b8b6fe0da3
commit 90e1df262d

View file

@ -406,6 +406,9 @@ class EventFederationWorkerStore(SignatureWorkerStore, EventsWorkerStore, SQLBas
# also returning large quantities of redundant data (which can make it a # also returning large quantities of redundant data (which can make it a
# lot slower). # lot slower).
if isinstance(txn.database_engine, PostgresEngine):
# JIT and sequential scans sometimes get hit on this code path, which
# can make the queries much more expensive
txn.execute("SET LOCAL jit = off") txn.execute("SET LOCAL jit = off")
txn.execute("SET LOCAL enable_seqscan = off") txn.execute("SET LOCAL enable_seqscan = off")