You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "git-chenhao (via GitHub)" <gi...@apache.org> on 2023/03/23 03:02:30 UTC

[GitHub] [shardingsphere] git-chenhao commented on issue #24744: When the application is first started, a small number of requests for RT are very high, and the basic time consuming is in the parse phase

git-chenhao commented on issue #24744:
URL: https://github.com/apache/shardingsphere/issues/24744#issuecomment-1480536862

   test code, local env need 2s+
   
   ```
    String sql ="/* mysql-connector-java-5.1.48 ( Revision: 29734982609c32d3ab7e5cac2e6acee69ff6b4aa ) */SELECT @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@performance_schema AS performance_schema, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@transaction_isolation AS transaction
 _isolation, @@wait_timeout AS wait_timeout";
   
           long start = System.currentTimeMillis();
           ShardingSphereSQLParserEngine parseEngine = new ShardingSphereSQLParserEngine(DatabaseTypeRegistry.getTrunkDatabaseTypeName(new MySQLDatabaseType()));
           long start2 = System.currentTimeMillis();
           System.out.println((start2 -start) + "ms");
           SQLStatement sqlStatement = parseEngine.parse(sql, true);
   
           System.out.println(sqlStatement);
           System.out.println((System.currentTimeMillis() -start) + "ms");
   ```


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