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 aUser
and aLocalSite
by way of
users
oradmins
. We now use thethrough
tables 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.