hachikozjq opened a new issue #15628:
URL: https://github.com/apache/shardingsphere/issues/15628


   版本5.0.0
   一条10ms内的sql,每次重启之后第一次执行刚开始会夸张到4、5s,后来根据网上的方法,在容器启动后执行一次“select 
X”,有效,但是第一次执行还需要2s左右,后面换成了具体的一张表查询,又下降到了500ms内,但是还是没有达到正常的10ms内的效果。
   ```
           String databaseType = "MySQL";
           String sql = "select id from xxx limit 1";
           // 方法1
           DatabaseTypedSQLParserFacade sqlParserFacade = 
DatabaseTypedSQLParserFacadeRegistry.getFacade(databaseType);
           SQLParser sqlParser = SQLParserFactory.newInstance(sql, 
sqlParserFacade.getLexerClass(),
                   sqlParserFacade.getParserClass(), true);
           ParseASTNode execute = (ParseASTNode) sqlParser.parse();
           ParseTree parseTree = execute.getRootNode();
           SQLVisitorFactory.newInstance(databaseType, "STATEMENT", 
SQLVisitorRule.valueOf(
                   parseTree.getClass()), null);
   ```


-- 
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