mirror of
https://github.com/element-hq/synapse.git
synced 2025-04-16 10:46:21 +00:00
Remove redundant room_memberships
join to find participating servers in a room (#15732)
Spawning from https://github.com/matrix-org/synapse/pull/15731
This commit is contained in:
parent
5c24d7b9eb
commit
195b6a298d
2 changed files with 3 additions and 3 deletions
1
changelog.d/15732.doc
Normal file
1
changelog.d/15732.doc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Simplify query to find participating servers in a room.
|
|
@ -27,9 +27,8 @@ What servers are currently participating in this room?
|
||||||
Run this sql query on your db:
|
Run this sql query on your db:
|
||||||
```sql
|
```sql
|
||||||
SELECT DISTINCT split_part(state_key, ':', 2)
|
SELECT DISTINCT split_part(state_key, ':', 2)
|
||||||
FROM current_state_events AS c
|
FROM current_state_events
|
||||||
INNER JOIN room_memberships AS m USING (room_id, event_id)
|
WHERE room_id = '!cURbafjkfsMDVwdRDQ:matrix.org' AND membership = 'join';
|
||||||
WHERE room_id = '!cURbafjkfsMDVwdRDQ:matrix.org' AND membership = 'join';
|
|
||||||
```
|
```
|
||||||
|
|
||||||
What users are registered on my server?
|
What users are registered on my server?
|
||||||
|
|
Loading…
Add table
Reference in a new issue