diff options
author | Shay <hillerys@element.io> | 2022-07-18 12:35:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-18 12:35:45 -0700 |
commit | 15edf23626a55ee38a8ee394bfcc8eaeff733c37 (patch) | |
tree | c164a2b90e90edafb483559d104a5d2086778c86 | |
parent | Fix overcounting of pushers when they are replaced (#13296) (diff) | |
download | synapse-15edf23626a55ee38a8ee394bfcc8eaeff733c37.tar.xz |
Improve performance of query ` _get_subset_users_in_room_with_profiles` (#13299)
-rw-r--r-- | changelog.d/13299.misc | 1 | ||||
-rw-r--r-- | synapse/storage/databases/main/roommember.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/13299.misc b/changelog.d/13299.misc new file mode 100644 index 0000000000..a9d5566873 --- /dev/null +++ b/changelog.d/13299.misc @@ -0,0 +1 @@ +Improve performance of query `_get_subset_users_in_room_with_profiles`. diff --git a/synapse/storage/databases/main/roommember.py b/synapse/storage/databases/main/roommember.py index 105a518677..46ab6232d4 100644 --- a/synapse/storage/databases/main/roommember.py +++ b/synapse/storage/databases/main/roommember.py @@ -243,7 +243,7 @@ class RoomMemberWorkerStore(EventsWorkerStore): txn: LoggingTransaction, ) -> Dict[str, ProfileInfo]: clause, ids = make_in_list_sql_clause( - self.database_engine, "m.user_id", user_ids + self.database_engine, "c.state_key", user_ids ) sql = """ |