Open
Description
Feature Request
Add SQLStatementParserCacheHook
to Provide Extension Point for Application SQL Parse Cache Warm-up, Referred to as Preheat
Is your feature request related to a problem?
#24744 #3676 #4480 #5209 #2793 #3083
Describe the feature you would like.
We propose adding a SQLStatementParserCacheHook
that serves as an extension point, allowing business applications to capture cache-missed compiled SQL statements. This mechanism is designed to enable application developers to use these captured SQL statements for parse cache warm-up before the actual user requests occur.
- Objective: Facilitate application-level SQL parse cache warm-up to improve performance on initial queries.
- Implementation: Introduce a hook that business logic can subscribe to, which triggers when there is a cache miss during SQL statement parsing. The hook should provide access to the missed SQL statement for external processing.
- Benefit: Developers can preemptively compile and cache SQL statements in their applications, reducing the latency experienced by users on their first interaction with the system.