Remove JOINs for starred item existence checks.

Review Request #12356 — Created June 10, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

This updates Profile.is_review_group_starred() and
Profile.is_review_request_starred() to avoid a JOIN when checking for
the existence of starred items. We now use the through table to
perform our check, avoiding the need to JOIN the Profile to the table.

Unit tests pass.

Changes between revision 1 and 2

orig
1
2

Commits

Summary ID Author
Remove JOINs for starred item existence checks.
This updates `Profile.is_review_group_starred() and `Profile.is_review_request_starred()` to avoid a JOIN when checking for the existence of starred items. We now use the `through` table to perform our check, avoiding the need to JOIN the `Profile` to the table.
b380c55d4c0f9a248488fa368d4a1335f9c98b7a Christian Hammond
Remove JOINs for starred item existence checks.
This updates `Profile.is_review_group_starred() and `Profile.is_review_request_starred()` to avoid a JOIN when checking for the existence of starred items. We now use the `through` table to perform our check, avoiding the need to JOIN the `Profile` to the table.
d8b6f651a9008022c4e1f285ee3f702bf7c907c9 Christian Hammond
reviewboard/accounts/tests/test_profile.py
Loading...