Eliminate JOINs when determining LocalSite user membership.

Review Request #12351 — Created June 10, 2022 and submitted

chipx86
Review Board
release-5.0.x
reviewboard

This updates the new User.get_local_site_stats() method to avoid
having to perform JOINs between a User and a LocalSite by way of
users or admins. We now use the through 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.

Summary
Eliminate JOINs when determining LocalSite user membership.
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-5.0.x (0ef1b9c)
Loading...