youjie23 commented on PR #34156:
URL: https://github.com/apache/shardingsphere/pull/34156#issuecomment-2564678167

   > The SQL always changes, using SPI to provide a static java class maybe not 
good enough.
   
   As described in  [ 
#34155](https://github.com/apache/shardingsphere/issues/34155) 
   The SQLStatementParserCacheHook   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 
,like right after restarting the application.
   
   **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.  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to