You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/02/25 05:59:54 UTC

[GitHub] [shardingsphere] hachikozjq opened a new issue #15628: 应用启动后第一条sql执行很慢很慢,往后恢复正常。

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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] yx9o commented on issue #15628: 应用启动后第一条sql执行很慢很慢,往后恢复正常。

Posted by GitBox <gi...@apache.org>.
yx9o commented on issue #15628:
URL: https://github.com/apache/shardingsphere/issues/15628#issuecomment-1050561575


   Hi @hachikozjq , for English only, please modify the issue title and content, thank you.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org