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

Fix distinct hash table performance bug #3350

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

acquamarin
Copy link
Collaborator

@acquamarin acquamarin commented Apr 23, 2024

This PR fixes an issue #3349 related to the performance issue in distinct hash table.
The bug is that: We forgot to update the hash value of tuples in the factorizedtable. As a result, all hash values are 0 by default, which means all tuple insertions triggers a hash collision.
Closes #3349
The query: MATCH (a:Person) RETURN COUNT(DISTINCT a) finishes in 0.5s on my MAC M1.

@acquamarin
Copy link
Collaborator Author

Hi @ted-wq-x,
I have identified the performance bug and opened this PR to resolve it.
Can you try whether the fix works on your side?
On my mac, the query finishes in 0.5seconds vs 150 seconds(before).

@acquamarin acquamarin merged commit 2f5c63d into master Apr 23, 2024
18 checks passed
@acquamarin acquamarin deleted the fix-distinct-hash-table-perf branch April 23, 2024 07:42
@ted-wq-x
Copy link
Contributor

It works, 👍

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.

Performance issue with distinct hash table
3 participants