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

Efficiently restrict number of levels when using descendants() #582

Open
aimeos opened this issue Feb 26, 2023 · 0 comments
Open

Efficiently restrict number of levels when using descendants() #582

aimeos opened this issue Feb 26, 2023 · 0 comments

Comments

@aimeos
Copy link

aimeos commented Feb 26, 2023

For really big trees (say 100k nodes in 5+ levels), descendants() will return all those nodes and will break the application. The subquery added by withDepth() is costly the more nodes the tree has. Did you thought about adding a level column for that reason? This would speed up retrieving e.g. only the first three levels in a 100k node tree drastically.

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

1 participant