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

[AGE-203] Optimize the identified queries identified by removing necessary fetch_links #1641

Closed
mmabrouk opened this issue May 12, 2024 · 0 comments
Assignees
Labels
Backend High Priority Task Created by Linear-GitHub Sync
Milestone

Comments

@mmabrouk
Copy link
Member

mmabrouk commented May 12, 2024

The goal of this issue is to optimize the identified queries (see the project description) in Atlas. The optimization can happen by identifying the beanie query, removing fetch_links, and instead:

  • Only fetching the elements that are needed
  • If the element is only needed because of the id, using the trick of ref to get that id without doing an aggregation

Old description

Optimizing the queries using the approach here (https://beanie-odm.dev/tutorial/relations/#on-demand-fetch) is straightforward. The difficulty is in having a consistent approach for the methods in db_manager. Do we fetch_links per default? If not, then should we extend an interface for the methods invoking the db_manager helpers to specify whether to fetch the links, which links, and to which recursion.

We should have a consistent way of dealing with this

From SyncLinear.com | AGE-203

@mmabrouk mmabrouk added High Priority Task Created by Linear-GitHub Sync labels May 12, 2024
@dosubot dosubot bot added the Backend label May 12, 2024
@mmabrouk mmabrouk closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2024
@mmabrouk mmabrouk reopened this May 12, 2024
@mmabrouk mmabrouk self-assigned this May 14, 2024
@mmabrouk mmabrouk modified the milestones: v.46, v.47 May 19, 2024
@mmabrouk mmabrouk closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend High Priority Task Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

1 participant