-
Notifications
You must be signed in to change notification settings - Fork 177
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
[Enhancement]: Optimize SQL Queries in SQLAlchemy to Eliminate N+1 Problem #1902
Conversation
…d execution time in backend console
…ion and evaluator config from DB in evaluate task function
…ssary fields and join-loading required table(s) to eliminate N+1 queries
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See non-blocking comments.
Thanks for the PR @aybruhm and for the review @jp-agenta Just wanted to check, has this been throughly QA'ed, i.e. all the modified endpoints / actions have been smoke tested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA done and everything works fine! |
Description
This PR refactors SQL queries in the backend to enhance performance by resolving the N+1 query problem. The updates involve selectively loading only necessary fields and utilizing join-loading for related tables to reduce excessive queries.
Related Issue
Closes AGE-430
Changes
What to QA
Acceptance Tests
Note: The N+1 query issue is a common performance bottleneck in SQL databases. This PR addresses the identified N+1 issue observed during evaluations. If Sentry reports additional N+1 issues, please tag me in the notification.