johnny2002 opened a new issue #7471:
URL: https://github.com/apache/shardingsphere/issues/7471


   Currently, shardingsphere configuration file need to repeat all tables' 
config, event they are using same sharding rule.
   e.g.
   ```properties
   
spring.shardingsphere.sharding.tables.table1.actual-data-nodes=ds$->{0..1}.tab_user$->{0..1}
   
spring.shardingsphere.sharding.tables.table1.table-strategy.inline.sharding-column=id
   
spring.shardingsphere.sharding.tables.table1.table-strategy.inline.algorithm-expression=tab_user$->{id
 % 2}
   
   
spring.shardingsphere.sharding.tables.table2.actual-data-nodes=ds$->{0..1}.tab_user$->{0..1}
   
spring.shardingsphere.sharding.tables.table2.table-strategy.inline.sharding-column=id
   
spring.shardingsphere.sharding.tables.table2.table-strategy.inline.algorithm-expression=tab_user$->{id
 % 2}
   ```
   in the example, table1 and table2 have exactly same sharding rule, I suggest 
to combine them into one group, like:
   ```properties
   spring.shardingsphere.sharding.groups.group1.tables=table1,table2
   
spring.shardingsphere.sharding.groups.group1.actual-data-nodes=ds$->{0..1}.tab_user$->{0..1}
   
spring.shardingsphere.sharding.tables.group1.table-strategy.inline.sharding-column=id
   
spring.shardingsphere.sharding.tables.group1.table-strategy.inline.algorithm-expression=tab_user$->{id
 % 2}
   ```
   
   


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