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/05/07 09:18:32 UTC

[GitHub] [shardingsphere] happyi commented on issue #16569: Serious performance loss

happyi commented on issue #16569:
URL: https://github.com/apache/shardingsphere/issues/16569#issuecomment-1120173007

   > > > Hi @happyi Could you show us how you did the benchmark? If you test the performance by performing only one insert, the result may be inaccurate. https://www.oracle.com/technical-resources/articles/java/architect-benchmarking.html
   > > 
   > > 
   > > this is a comparison test with the standard jpa 。the datum point is not sharing the code like bellow
   > > ```
   > >         DynamicDataSourceHolder.setDataSource(DataSourceEnum.MASTER.toString());
   > >         Long startTime = System.currentTimeMillis();
   > >         String orderId = insertOrder();
   > >         log.info("不分库分表耗时:{},orderId:{}", (System.currentTimeMillis() - startTime), orderId);
   > >         orderItemRepository.deleteByOrderId(orderId);
   > >         orderRepository.deleteById(orderId);
   > >         DynamicDataSourceHolder.clearDataSource();
   > > 
   > >         DynamicDataSourceHolder.setDataSource(DataSourceEnum.SHARDING.toString());
   > >         startTime = System.currentTimeMillis();
   > >         orderId = insertOrder();
   > >         log.info("分库分表总耗时:{},orderId:{}", (System.currentTimeMillis() - startTime), orderId);
   > >         DynamicDataSourceHolder.clearDataSource();
   > >         orderItemRepository.deleteByOrderId(orderId);
   > >         orderRepository.deleteById(orderId);
   > > ```
   > 
   > The JIT is not considered in your test. The result cannot represent the performance of ShardingSphere.
   
    bulk testing  get  the same result


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