Browse Source

Speed up background jobs populate_full_user_id_user_filters and populate_full_user_id_profiles (#15700)

Shay 1 year ago
parent
commit
6d9e2fd878

+ 1 - 0
changelog.d/15700.misc

@@ -0,0 +1 @@
+Speed up background jobs `populate_full_user_id_user_filters` and `populate_full_user_id_profiles`.

+ 1 - 1
synapse/storage/databases/main/filtering.py

@@ -71,7 +71,7 @@ class FilteringWorkerStore(SQLBaseStore):
                     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()

+ 1 - 1
synapse/storage/databases/main/profile.py

@@ -65,7 +65,7 @@ class ProfileWorkerStore(SQLBaseStore):
                     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()