mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-27 16:15:19 -04:00
Add another index to device_lists_changes_in_room
(#14534)
This helps avoid reading unnecessarily large amounts of data from the table when querying with a set of room IDs.
This commit is contained in:
parent
4ae967cf63
commit
f38d7d79c8
3 changed files with 28 additions and 0 deletions
|
@ -1441,6 +1441,13 @@ class DeviceBackgroundUpdateStore(SQLBaseStore):
|
|||
self._remove_duplicate_outbound_pokes,
|
||||
)
|
||||
|
||||
self.db_pool.updates.register_background_index_update(
|
||||
"device_lists_changes_in_room_by_room_index",
|
||||
index_name="device_lists_changes_in_room_by_room_idx",
|
||||
table="device_lists_changes_in_room",
|
||||
columns=["room_id", "stream_id"],
|
||||
)
|
||||
|
||||
async def _drop_device_list_streams_non_unique_indexes(
|
||||
self, progress: JsonDict, batch_size: int
|
||||
) -> int:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue