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

Commit

Permalink
Speed up background jobs populate_full_user_id_user_filters and popul…
Browse files Browse the repository at this point in the history
…ate_full_user_id_profiles (#15700)
  • Loading branch information
H-Shay authored May 31, 2023
1 parent 11e15d7 commit 6d9e2fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/15700.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Speed up background jobs `populate_full_user_id_user_filters` and `populate_full_user_id_profiles`.
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _get_last_id(txn: LoggingTransaction) -> Optional[str]:
SELECT user_id FROM user_filters
WHERE user_id > ?
ORDER BY user_id
LIMIT 1 OFFSET 50
LIMIT 1 OFFSET 1000
"""
txn.execute(sql, (lower_bound_id,))
res = txn.fetchone()
Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _get_last_id(txn: LoggingTransaction) -> Optional[str]:
SELECT user_id FROM profiles
WHERE user_id > ?
ORDER BY user_id
LIMIT 1 OFFSET 50
LIMIT 1 OFFSET 1000
"""
txn.execute(sql, (lower_bound_id,))
res = txn.fetchone()
Expand Down

0 comments on commit 6d9e2fd

Please sign in to comment.