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

has_children computation: stress test on nodes with many children #9973

Closed
philipperolet opened this issue Jan 14, 2025 · 3 comments
Closed
Assignees

Comments

@philipperolet
Copy link
Contributor

Following #9947

When computing has_children with multiple nodes, if a node has lots of children (e.g. the Qonto "17K children" for a notion DB), does it impact the query? does it prevent computing other parents because of the size parameter?

@philipperolet philipperolet self-assigned this Jan 15, 2025
@philipperolet
Copy link
Contributor Author

After investigation, the computation is correct; the
However the aggregation should be a count rather than a list of all children, more efficient for nodes with many children
AFAIU aggregating directly a boolean won't improve performance and won't necessarily be simpler (i'm 90% on this, so good enough to skip & come back if needed)
We can take the opportunity to change to children_count rather than has_children

@philipperolet
Copy link
Contributor Author

After further investigation, code already performs a count
Further evidence that trying to aggregate a boolean would not be worth it: https://dust.tt/w/0ec9852c2f/assistant/fJ81UiIrNv
Will change the field to a children_count and close

@philipperolet
Copy link
Contributor Author

Closed by #10382

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