mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 19:54:53 -04:00
Test some ideas that might help performance a bit
This commit is contained in:
parent
dec5b62339
commit
f3788e3c78
4 changed files with 32 additions and 23 deletions
|
@ -183,20 +183,14 @@ class RoomMemberStore(SQLBaseStore):
|
|||
)
|
||||
|
||||
def _get_members_query_txn(self, txn, where_clause, where_values):
|
||||
del_sql = (
|
||||
"SELECT event_id FROM redactions WHERE redacts = e.event_id "
|
||||
"LIMIT 1"
|
||||
)
|
||||
|
||||
sql = (
|
||||
"SELECT e.*, (%(redacted)s) AS redacted FROM events as e "
|
||||
"SELECT e.* FROM events as e "
|
||||
"INNER JOIN room_memberships as m "
|
||||
"ON e.event_id = m.event_id "
|
||||
"INNER JOIN current_state_events as c "
|
||||
"ON m.event_id = c.event_id "
|
||||
"WHERE %(where)s "
|
||||
) % {
|
||||
"redacted": del_sql,
|
||||
"where": where_clause,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue