forked-synapse/synapse/push
Erik Johnston b11f7b5122
Improve DB performance of calculating badge counts for push. (#16756)
The crux of the change is to try and make the queries simpler and pull
out fewer rows. Before, there were quite a few joins against subqueries,
which caused postgres to pull out more rows than necessary.

Instead, let's simplify the query and do some of the filtering out in
Python instead, letting Postgres do better optimizations now that it
doesn't have to deal with joins against subqueries.

Review note: this is a complete rewrite of the function, so not sure how
useful the diff is.

---------

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-01-11 11:52:13 +00:00
..
__init__.py Update license headers 2023-11-21 15:29:58 -05:00
bulk_push_rule_evaluator.py Update license headers 2023-11-21 15:29:58 -05:00
clientformat.py Update license headers 2023-11-21 15:29:58 -05:00
emailpusher.py Merge remote-tracking branch 'gitlab/clokep/license-license' into new_develop 2023-12-13 15:11:56 +00:00
httppusher.py Update license headers 2023-11-21 15:29:58 -05:00
mailer.py Update license headers 2023-11-21 15:29:58 -05:00
presentable_names.py Update license headers 2023-11-21 15:29:58 -05:00
push_tools.py Improve DB performance of calculating badge counts for push. (#16756) 2024-01-11 11:52:13 +00:00
push_types.py Update license headers 2023-11-21 15:29:58 -05:00
pusher.py Update license headers 2023-11-21 15:29:58 -05:00
pusherpool.py Update license headers 2023-11-21 15:29:58 -05:00
rulekinds.py Update license headers 2023-11-21 15:29:58 -05:00