honestAnt opened a new issue, #27502:
URL: https://github.com/apache/shardingsphere/issues/27502

   ## Question
   
   I use shardingsphere-jdbc-core-spring-boot-starter(v5.1.1) 
、mybatis-plus-boot-starter(3.5.1) into my springBoot project. 
   When I use native sql to batch insert data in mapper.xml, I found that the 
incoming collection data will be used as the sharding condition of 
shardingConditions after grammar and lexical analysis, and then each condition 
must be sharded to find the matching dataNode , the performance is poor when 
the amount of data inserted in batches is large (most of the shard keys are 
repeated and do not need to be recalculated)
   
   Batch insert sql example in mapper.xml:insert into ${table} 
(column1,column2..) values (xxx,xx),(xx,xx)...
   sharding rules: using the value of a column in the table
   
   Related test screenshots:
   
   
   
![image](https://github.com/apache/shardingsphere/assets/15356873/7f20f7dd-1778-4c5f-927c-fac35577bb1f)
   
   Question: Is it possible to customize ShardingRouteEngine (similar to 
ShardingStandardRoutingEngine) and add a tableColumn cache before the route0() 
method call to solve the problem of repeated routing?
   
![image](https://github.com/apache/shardingsphere/assets/15356873/e51ffb98-7f2e-4a44-b034-075fc9e64db2)
   
   


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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to