Skip to content

Try lazyfree temp zset in ZUNION / ZINTER / ZDIFF and optimize ZINTERCARD to avoid create temp zset #12229

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

Merged

Conversation

enjoy-binbin
Copy link
Contributor

@enjoy-binbin enjoy-binbin commented May 24, 2023

We check lazyfree_lazy_server_del in sunionDiffGenericCommand
to see if we need to lazyfree the temp set. Now do the same in
zunionInterDiffGenericCommand to lazyfree the temp zset.

This is a minor change, follow #5903. Also improved the comments.

Additionally, avoid creating unused zset object in ZINTERCARD,
results in some 10% performance improvement.

We check lazyfree_lazy_server_del in sunionDiffGenericCommand
to see if we need to lazyfree the temp set. Now do the same in
zunionInterDiffGenericCommand to lazyfree the temp zset.

This is a minor change, follow redis#5903. Also improved the comments.
@enjoy-binbin enjoy-binbin requested a review from soloestoy May 24, 2023 15:30
@enjoy-binbin enjoy-binbin changed the title Try lazyfree temp zset in ZUNION / ZINTER / ZDIFF Optimize ZINTERCARD to avoid create temp zset and try lazyfree temp zset in ZUNION / ZINTER / ZDIFF May 29, 2023
@enjoy-binbin enjoy-binbin changed the title Optimize ZINTERCARD to avoid create temp zset and try lazyfree temp zset in ZUNION / ZINTER / ZDIFF Try lazyfree temp zset in ZUNION / ZINTER / ZDIFF and optimize ZINTERCARD to avoid create temp zset May 29, 2023
@oranagra oranagra merged commit 32f4521 into redis:unstable May 29, 2023
@oranagra oranagra added the release-notes indication that this issue needs to be mentioned in the release notes label May 29, 2023
@enjoy-binbin enjoy-binbin deleted the zunionInterDiffGenericCommand_lazyfree branch May 29, 2023 06:56
@oranagra oranagra mentioned this pull request Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes indication that this issue needs to be mentioned in the release notes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants