mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 13:33:50 +01:00
b11f7b5122
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>
1 line
61 B
Text
1 line
61 B
Text
Improve DB performance of calculating badge counts for push.
|