-
Notifications
You must be signed in to change notification settings - Fork 12
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
perf: HANA list placeholder #380
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BobdenOs
requested review from
danjoa,
johannes-vogel and
stewsk
as code owners
December 11, 2023 11:15
…to hana-json-list
johannes-vogel
approved these changes
Dec 15, 2023
Merged
Merged
patricebender
pushed a commit
that referenced
this pull request
Jul 25, 2024
🤖 I have created a release *beep* *boop* --- <details><summary>db-service: 1.12.0</summary> ## [1.12.0](db-service-v1.11.0...db-service-v1.12.0) (2024-07-25) ### Fixed * see changelog ### Changed * generic-pool as real dep ([#750](#750)) ([b50c907](b50c907)) ### Performance Improvements * HANA list placeholder ([#380](#380)) ([3eadfea](3eadfea)) </details> <details><summary>postgres: 1.9.2</summary> ## [1.9.2](postgres-v1.9.1...postgres-v1.9.2) (2024-07-25) ### Changed * build script generates cds8 dependency in deployer app ([#758](#758)) ([5c21a67](5c21a67)) </details> <details><summary>hana: 1.1.1</summary> ## [1.1.1](hana-v1.1.0...hana-v1.1.1) (2024-07-25) ### Fixed * assocs with default value ([#752](#752)) ([a8660cf](a8660cf)) * make name for columns for ordinality unique ([#746](#746)) ([d3f9b23](d3f9b23)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: Johannes Vogel <johannes.vogel@sap.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Concept
HANA does a lot of preprocessing and optimization of queries. Which is cached and reused when the same SQL string is used. There is a limit to how many execution plans are cached by the HANA system. When reaching the cache limit queries will take much longer to execute. As new query executions will push out older caches. Resulting in the execution plan cache always being recalculated.
To prevent the execution plan cache from being exhausted it is important to produce the same SQL string as often as possible. There for this pull request fixes a core problem with the placeholder calculations. Additionally it checks any
list
definitions forval
contents. When it is determined that the list only consists ofval
it is converted into a JSON string and the SQL will contain aJSON_TABLE
call. This should produce the same SQL string Independent of the number of entries in thelist
. Reducing the size of the SQL string and number of cached execution plans.