Update review queries to query Local Sites conditionally.

Review Request #13357 — Created Oct. 18, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

Review Board 5 introduced some mechanisms for optimizing queries to
avoid filering by Local Sites if there aren't any Local Sites in the
database. We updated a few queries to use this, but not all.

This change updates ReviewManager to take advantage of this, reducing
the complexity of queries and helping the database better use its
indexes on a typical install.

There's also a fix for building queries for Local Sites, taking
advantage of the field name provided.

This is the first in a series of changes for optimizing Local Site
filters out of queries.

All unit tests pass.

Commits

Files

    Loading...