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

Fix N+1 queries in /api/v1/users/{username}/get_facilities/ #1334

Open
Tracked by #1333
sainak opened this issue Jun 2, 2023 · 3 comments
Open
Tracked by #1333

Fix N+1 queries in /api/v1/users/{username}/get_facilities/ #1334

sainak opened this issue Jun 2, 2023 · 3 comments
Assignees

Comments

@sainak
Copy link
Member

sainak commented Jun 2, 2023

Sentry Issue: CARE-MK

Transaction Name /api/v1/users/{username}/get_facilities/
Parent Span django.view - user-get-facilities
Repeating Spans (0) db - SELECT COUNT(*) AS __count FROM facility_patientregistration WHERE (facility_patientregistration.deleted = %s AND facility_patientregistration.facility_id = %s AND facility_patientregistration.is_active = %s)
db - SELECT COUNT(*) AS __count FROM facility_bed WHERE (facility_bed.deleted = %s AND facility_bed.facility_id = %s)
@sainak sainak mentioned this issue Jun 2, 2023
7 tasks
@sainak sainak self-assigned this Jun 2, 2023
@satyam0601
Copy link

can we use the prefetch_related() to fetch for related objects in one query?
if yes can i work on this issue?

@rithviknishad
Copy link
Member

@satyam0601 you can take up other issues that are not assigned.

@satyam0601
Copy link

Okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants