Eliminate JOINs when determining LocalSite user membership.
Review Request #12351 — Created June 10, 2022 and submitted — Latest diff uploaded
This updates the new
User.get_local_site_stats()method to avoid
having to perform JOINs between a
LocalSiteby way of
admins. We now use the
throughtables instead to build
the query. This simplifies the queries and allows the database to more
easily make use of the indexes established on these tables.
Unit tests pass.