jackjoesh removed a comment on issue #9330:
URL: https://github.com/apache/shardingsphere/issues/9330#issuecomment-779295214


   I use the ShardingSphere-JDBC.   I have made a test for testing speed of 
version 3.1 and speed of version 4.1.1.
   
   test method:  use the same select sql to test the speed of different 
version, such as : select * from `order_history` where order_id = ? and symbol 
= ? and user_id = ?
   
   monitor method:  monitor each method cost time in stacktrace by using 
aspectj load time weaver in spring boot
   
   monitor log example:  
sharding-monitor|io.shardingsphere.shardingjdbc.jdbc.adapter.AbstractShardingPreparedStatementAdapter|getParameters|0
   the column 1 is just a header,   the column 2 is target class,   the column 
3 is invoke method,  the column 4 is cost time  (time unit is MICROSECONDS)
   
   the test result:  the phase "sqlRoute" of version 3.1 is always 1-1.5 
milliseconds(1000 MICROSECONDS - 1500MICROSECONDS) faster than the phase 
"prepare" of version 4.1.1.  
   version 3.1:  
sharding-monitor|io.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement|sqlRoute|850
   version 4.1.1:  
sharding-monitor|org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement|prepare|2062
   I think these two phases have the same funtions: parse, rewrite, route,  so 
compare them.
   
   the monitor log is in attachment, you can check it.
   
[version3.1-sqlroute-log.txt](https://github.com/apache/shardingsphere/files/5982509/version3.1-sqlroute-log.txt)
   
[version4.1.1-prepare-log.txt](https://github.com/apache/shardingsphere/files/5982513/version4.1.1-prepare-log.txt)
   
   So I insist because the class structure of version 4.11 is more complicated 
than version 3.1,  cost more time.


----------------------------------------------------------------
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:
[email protected]


Reply via email to