Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Use USING when joining erased_users
Browse files Browse the repository at this point in the history
  • Loading branch information
tadzik committed Oct 18, 2022
1 parent 060d990 commit 30bd2bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def get_users_paginate_txn(
sql_base = f"""
FROM users as u
LEFT JOIN profiles AS p ON u.name = '@' || p.user_id || ':' || ?
LEFT JOIN erased_users AS eu ON u.name = eu.user_id
LEFT JOIN erased_users AS eu USING(user_id)
{where_clause}
"""
sql = "SELECT COUNT(*) as total_users " + sql_base
Expand Down

0 comments on commit 30bd2bf

Please sign in to comment.