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 2019/11/13 08:24:05 UTC
[GitHub] [incubator-shardingsphere] beiwangnull commented on issue #3083:
After the service restarts, the request is time-consuming in a short time
beiwangnull commented on issue #3083: After the service restarts, the request is time-consuming in a short time
URL: https://github.com/apache/incubator-shardingsphere/issues/3083#issuecomment-553292217
@terrymanu @zcjhwl It's going to be faster
@Component
public class PreHeating implements InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
Collection<DatabaseType> databaseTypes = SQLParserFactory.getAddOnDatabaseTypes();
for (DatabaseType databaseType:databaseTypes){
if("MySQL".equals(databaseType.getName())){
SQLParseEngine parseEngine = SQLParseEngineFactory.getSQLParseEngine(databaseType);
parseEngine.parse("select 'X'",true);
MySQLParser mySQLParser = (MySQLParser)SQLParserFactory.newInstance(databaseType,"select 'X'");
mySQLParser.execute();
}
}
}
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services