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

engine: cache prepared statements #1401

Merged
merged 7 commits into from
Feb 21, 2025
Merged

engine: cache prepared statements #1401

merged 7 commits into from
Feb 21, 2025

Conversation

brennanjl
Copy link
Collaborator

This PR adds caching for statements in the interpreter, removing the need to redundantly parse, analyze, and generate SQL for statements that don't change. The cache is invalidated any time any table is changed; this is because a change in the DB schema may change what is necessary to make a query deterministic.

This PR also fixes a bug that I coincidentally found while clicking through the query planner looking for something else. It was not properly applying default ordering to window functions.

@brennanjl brennanjl assigned jchappelow and unassigned jchappelow Feb 21, 2025
@brennanjl brennanjl requested a review from jchappelow February 21, 2025 17:56
Copy link
Member

@jchappelow jchappelow left a comment

Choose a reason for hiding this comment

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

Looks great. Engine hotspot is completely gone.

@jchappelow jchappelow merged commit 38f5803 into main Feb 21, 2025
2 checks passed
@jchappelow jchappelow deleted the cache-statements branch February 21, 2025 23:38
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