Optimize the query for Group and Repository.objects.accessible_ids().
Review Request #11605 — Created May 13, 2021 and submitted
This is a small query improvement to
the usage of
DISTINCTwhen querying a list of accessible IDs for
Repository. This means less work needed by the database,
removing the usage of a temporary table on MySQL. Any de-duplication
will now be done in Python, by converting to a
It's a small performance improvement setting the stage for some larger
work on improving query performance.
Both versions of
DISTINCTby default, but
this can be turned off by passing
Unit tests passed.
EXPLAINoutput between the two versions of the query