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

More efficient execution of Recursive CTE plans #3043

Open
hatyo opened this issue Jan 15, 2025 · 0 comments
Open

More efficient execution of Recursive CTE plans #3043

hatyo opened this issue Jan 15, 2025 · 0 comments
Assignees
Labels
performance Performance issues planner Related to the query planner

Comments

@hatyo
Copy link
Contributor

hatyo commented Jan 15, 2025

With #2981 we adopt a level-based traversal execution strategy. The memory footprint of this strategy is dependent on the shape of the hierarchy; so for extremely wide hierarchies, it would consume a lot of memory which is not very efficient.

Under certain conditions, we can adopt a more efficient DFS traversal strategy that is much more efficient for shallow (but extremely wide) hierarchies since the memory consumption in this case is O(depth) of the hierarchy. Implementing this requires a new execution runtime that is more or less a special implementation of FlatMapPipelinedCursor.

@hatyo hatyo added planner Related to the query planner performance Performance issues labels Jan 15, 2025
@hatyo hatyo self-assigned this Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance issues planner Related to the query planner
Projects
None yet
Development

No branches or pull requests

1 participant