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: Reduce sequential queries for MMR #586

Merged
merged 4 commits into from
Jul 11, 2024
Merged

Conversation

bjchambers
Copy link
Contributor

This denormalizes the outgoing tags into the links table, so that
traversal doesn't need to fetch the set of outgoing tags in an initial
query. This means that traversing is one batch of concurrent queries,
rather than two steps in sequence.

This lowers average retrieval time in 6 experiments from 1.3364s to
1.0920s (would increase as more nodes are retrieved). Writing the
additional copies of the denormalized tags adds a little to indexing
time.

This denormalizes the outgoing tags into the `links` table, so that
traversal doesn't need to fetch the set of outgoing tags in an initial
query. This means that traversing is one batch of concurrent queries,
rather than two steps in sequence.

This lowers average retrieval time in 6 experiments from 1.3364s to
1.0920s (would increase as more nodes are retrieved). Writing the
additional copies of the denormalized tags adds a little to indexing
time.
@bjchambers bjchambers requested review from epinzur and kerinin July 11, 2024 17:13
Copy link
Collaborator

@epinzur epinzur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the CQL looks good. I don't have a good enough grasp of the code to comment on the rest of the implementation.

@bjchambers bjchambers merged commit 507d1c0 into main Jul 11, 2024
22 checks passed
@bjchambers bjchambers deleted the speed-up-traversal branch July 11, 2024 22:05
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