The former SQL query was producing WHERE clause against python repr of tuples. Rewrting this exact query would likely require usage of raw PostgreSQL specific SQL.
Therefore instead of querying list teams by tuples of organization name and team name, we query all teams within set of organization ids. This queries slighly more date, but tallows us to avoid extra JOIN with the Organization table and complicated filtering.
The former SQL query was producing
WHERE
clause against python repr of tuples. Rewrting this exact query would likely require usage of raw PostgreSQL specific SQL. Therefore instead of querying list teams by tuples of organization name and team name, we query all teams within set of organization ids. This queries slighly more date, but tallows us to avoid extraJOIN
with theOrganization
table and complicated filtering.Minor refactoring.