Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize predicates by prefetching roles #253

Open
SebCorbin opened this issue Dec 21, 2020 · 0 comments
Open

Optimize predicates by prefetching roles #253

SebCorbin opened this issue Dec 21, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@SebCorbin
Copy link
Contributor

There's a lot of queries around predicates, e.g.

SELECT "partnership_partnershipentitymanager"."id",        "partnership_partnershipentitymanager"."person_id",        "partnership_partnershipentitymanager"."entity_id",        "partnership_partnershipentitymanager"."with_child",        "partnership_partnershipentitymanager"."scopes"   FROM "partnership_partnershipentitymanager"  WHERE "partnership_partnershipentitymanager"."person_id" = X

These are run each a predicate is accessed, it could be prevented by using `prefetch_related_objects()' on the person if the related_name of PartnershipEntityManager.person was specified.

@SebCorbin SebCorbin added the enhancement New feature or request label Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant