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

Exclude non-insert queies from clearing #14

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

meri025
Copy link
Contributor

@meri025 meri025 commented Jul 19, 2024

Summary

Fix the issue that non-INSERT queries (such as SELECT and DELETE) are unnecessary included in the clearing target tables. This change ensures that only queries matching the INSERT pattern are considered for clearing.

Other Information

Checklist

Copy link
Contributor

@genya0407 genya0407 left a comment

Choose a reason for hiding this comment

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

From an overall perspective, the cost of file writes is small, but performance certainly appears to be improving, according to a simple benchmark

end
return if new_inserted_tables.empty?

@inserted_tables.merge(new_inserted_tables)
Copy link
Contributor

Choose a reason for hiding this comment

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

I was surprised. Set#merge is destructive!

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