mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-13 05:42:10 -04:00
Add index to help delete old push actions (#13141)
This commit is contained in:
parent
79c6b9e12b
commit
a3a05c812d
4 changed files with 32 additions and 4 deletions
|
@ -1189,6 +1189,16 @@ class EventPushActionsStore(EventPushActionsWorkerStore):
|
|||
where_clause="highlight=1",
|
||||
)
|
||||
|
||||
# Add index to make deleting old push actions faster.
|
||||
self.db_pool.updates.register_background_index_update(
|
||||
"event_push_actions_stream_highlight_index",
|
||||
index_name="event_push_actions_stream_highlight_index",
|
||||
table="event_push_actions",
|
||||
columns=["highlight", "stream_ordering"],
|
||||
where_clause="highlight=0",
|
||||
psql_only=True,
|
||||
)
|
||||
|
||||
async def get_push_actions_for_user(
|
||||
self,
|
||||
user_id: str,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue