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

Query planner using join #157

Open
namnm opened this issue Nov 25, 2023 · 1 comment
Open

Query planner using join #157

namnm opened this issue Nov 25, 2023 · 1 comment

Comments

@namnm
Copy link

namnm commented Nov 25, 2023

Motivation

Solve the N + 1 issue, data loader is currently being used

Proposed Solutions

Option to solve it with join, similar to this:
https://github.com/join-monster/join-monster

Additional Information

There are couple of other things if we can adapt from that library, which Im not sure if this seaography has implemented or not:

  • Only select necessary fields, not *
  • A way to specify or adding into the where condition
  • Multiple order by
  • Query through junction (or any relation)
@karatakis
Copy link
Collaborator

@namnm Thanks for taking the time to discuss your concerns with us. Currently, we solve N+1 in most cases except in m-n relations. The project you suggested is amazing, but unfortunately, it follows a different approach. The scope of SeaQuery is to be combined with metadata provided by SeaORM. This limits our options, and sometimes, it is hard to move this information around. But I will keep your suggestion in mind and, in a future refactoring to change the background of how this project works.

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

No branches or pull requests

2 participants