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

feat: Compress HANA expand queries by reducing duplicated statements #383

Merged
merged 9 commits into from
Dec 20, 2023

Conversation

BobdenOs
Copy link
Contributor

Concept

When constructing an expand query it is required to reference the parent query in the child query. This was originally prevented by storing the results into a table value, but when switching away from the DO BEGIN syntax the queries where being duplicated into each child query. This change attempts to remove the query duplication by defining them inside the WITH clause which allows the child queries to directly reference the parent query. This SHOULD allow for the SQL parser to parse less and SHOULD allow for the execution plan optimizer to easier recognize that the query is doing the same thing. The big danger is that the execution plan recognizes that the query is doing the same thing and results in the queries executing in sequence. Which might result in reverting the behavior back to before #342. So the hope is that this makes everything much better and faster. 🤞

@BobdenOs BobdenOs added the next release pr to be checked for next release label Dec 14, 2023
@johannes-vogel
Copy link
Contributor

@BobdenOs I've tried to resolve the conflicts but I don't know whether the failing tests are a result of a bad conflict resolution. Could you double check? At least the commit history tells me that this was anyway not yet working?!

@johannes-vogel johannes-vogel merged commit 3d29351 into main Dec 20, 2023
4 checks passed
@johannes-vogel johannes-vogel deleted the hana-compress-expand branch December 20, 2023 09:30
@cap-bots cap-bots mentioned this pull request Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next release pr to be checked for next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants