diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2021-02-15 17:36:43 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2021-02-15 17:41:26 +0000 |
commit | f3e4cf3758596f09378fada6b1876b546bd0299b (patch) | |
tree | 50dead213185b6ff8cfd0ee102712cdc3a20d5e3 /changelog.d/6043.feature | |
parent | Add instead of update requesting user_id to set; invalidate cache context (diff) | |
download | synapse-anoa/presence_speedups.tar.xz |
Fix get_users_who_share_room_with_user SQL github/anoa/presence_speedups anoa/presence_speedups
Three fixes here: * Using UNION only selects DISTINCT rows from each query. However, if we DISTINCT the rows during the query, and then use UNION ALL which doesn't attempt to select distinct rows, we get a 1/3rd speedup in query time! * We should select other_user_id instead of user_id from users_who_share_private_rooms, as user_id will always be the requesting user. * Added p1.user_id != p2.user_id to filter out the same entries between each table in the users_in_public_rooms query.
Diffstat (limited to 'changelog.d/6043.feature')
0 files changed, 0 insertions, 0 deletions