mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-22 18:25:34 +00:00
Temporarily disable sequential scans for state fetching
This commit is contained in:
parent
3c320c006c
commit
b568ca309c
@ -310,6 +310,10 @@ class StateStore(SQLBaseStore):
|
|||||||
|
|
||||||
results = {group: {} for group in groups}
|
results = {group: {} for group in groups}
|
||||||
if isinstance(self.database_engine, PostgresEngine):
|
if isinstance(self.database_engine, PostgresEngine):
|
||||||
|
# Temporarily disable sequential scans in this transaction. This is
|
||||||
|
# a temporary hack until we can add the right indices in
|
||||||
|
txn.execute("SET LOCAL enable_seqscan=off")
|
||||||
|
|
||||||
# The below query walks the state_group tree so that the "state"
|
# The below query walks the state_group tree so that the "state"
|
||||||
# table includes all state_groups in the tree. It then joins
|
# table includes all state_groups in the tree. It then joins
|
||||||
# against `state_groups_state` to fetch the latest state.
|
# against `state_groups_state` to fetch the latest state.
|
||||||
|
Loading…
Reference in New Issue
Block a user