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 2020/06/17 04:29:52 UTC

[GitHub] [shardingsphere] tristaZero commented on issue #5284: [Call For Idea] Complex Sharding Algorithm

tristaZero commented on issue #5284:
URL: https://github.com/apache/shardingsphere/issues/5284#issuecomment-645142283


   @big-mountain-z Hi sorry to feedback so late.
   Currently, you can decide database-sharding and table-sharding by configuring `tableStrategy` and `databaseStrategy` together, like,
   ```yaml
   shardingRule:
     tables:
       t_order:
         actualDataNodes: ds${0..1}.t_order${0..1}
         databaseStrategy:
           inline:
             shardingColumn: user_id
             algorithmExpression: ds${user_id % 2}
         tableStrategy: 
           inline:
             shardingColumn: order_id
             algorithmExpression: t_order${order_id % 2}
         keyGenerateStrategy:
           type: SNOWFLAKE
           column: order_id
   ```
   
   So I am not sure I can get your point?
   


----------------------------------------------------------------
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:
users@infra.apache.org