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

Split InMemHashIndex in-place #3345

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Conversation

benjaminwinger
Copy link
Collaborator

This optimizes the in memory hash index splitting to track the insertion position instead of probing from the beginning of the slot each time. It has a relatively small, but noticeable impact; I'd written it mostly because the other optimization I'm working on (removing the requirement that the in memory hash index used for multi-copy needs to have the same capacity as the on-disk index) seemed to make the cost of this much more significant (it should for the second copy, where the in-memory index no longer has a much larger capacity than necessary, but I'm not sure why it's making a difference on the first copy too).

Also note that it only helps in the cases where we under-estimate the space necessary for the in-memory index (we reserve capacity based on the number of rows divided by the number of hash indices, but the keys are divided up based on their hash and aren't evenly distributed between the 256 indices).

src/storage/index/in_mem_hash_index.cpp Outdated Show resolved Hide resolved
@benjaminwinger benjaminwinger merged commit fa3afd7 into master Apr 24, 2024
17 checks passed
@benjaminwinger benjaminwinger deleted the in-mem-hash-index-split-opt branch April 24, 2024 14:44
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

Successfully merging this pull request may close these issues.

2 participants