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.
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
IGNITE-17855 Implement inline size calculation for B+tree #1179
IGNITE-17855 Implement inline size calculation for B+tree #1179
Changes from 3 commits
d5a644a
1509c97
b0dd2b7
3b69d8a
dc5f753
b84bb3a
06d9552
596fd1f
868e8b0
e1b366f
820cd57
5016ec9
3584e3c
d35256f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you expect most of users will use 2 bytes chars?
Why should an index over columns of ASCII chars be twice large by default?
And what to do with 4-byte chars?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I proceed from the fact that in Java characters is
char
(2 bytes).We can assume, as in Java, that in most cases the characters will be ascii (1 byte).
We're just doing an approximate inline count, I don't know how often we'll see 4 byte characters.
Later we can add an encoding (utf-8, 16, 32) to the configuration or ddl.
wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, also I'd limit default value for var-length types (e.g. with 64-256 bytes).
Usually, the upper limit for var-length columns is usually calculated with some reserve.
So, the actual values size is less the limit (often noticeably).
Also, large inline-size means less data will fit to the index page and may have negative impact on performance.
In case of relatively large values with similar prefixes user always can increase inline-size manually,
but imho, in most of cases, this limit will reduce index size with no performance penalty.