mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Add missing index to access_tokens
table (#17045)
This was causing sequential scans when using refresh tokens.
This commit is contained in:
parent
51776745b9
commit
31122b71bc
1
changelog.d/17045.misc
Normal file
1
changelog.d/17045.misc
Normal file
@ -0,0 +1 @@
|
||||
Improve database performance by adding a missing index to `access_tokens.refresh_token_id`.
|
@ -2266,6 +2266,13 @@ class RegistrationStore(StatsStore, RegistrationBackgroundUpdateStore):
|
||||
):
|
||||
super().__init__(database, db_conn, hs)
|
||||
|
||||
self.db_pool.updates.register_background_index_update(
|
||||
update_name="access_tokens_refresh_token_id_idx",
|
||||
index_name="access_tokens_refresh_token_id_idx",
|
||||
table="access_tokens",
|
||||
columns=("refresh_token_id",),
|
||||
)
|
||||
|
||||
self._ignore_unknown_session_error = (
|
||||
hs.config.server.request_token_inhibit_3pid_errors
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user