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/11/23 04:17:57 UTC
[GitHub] [shardingsphere] xiaoliu10 edited a comment on issue #8217: proxy excute insert sql but insert into all physical table
xiaoliu10 edited a comment on issue #8217:
URL: https://github.com/apache/shardingsphere/issues/8217#issuecomment-730174580
this is rules config:
```yaml
rules:
- !SHARDING
tables:
t_order:
actualDataNodes: zookeeper_${[0,1,2]}.t_order_${[0,1,2]}
databaseStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: hash_mode
tableStrategy:
standard:
shardingColumn: user_id
shardingAlgorithmName: hash_mode
keyGenerateStrategy:
column: order_id
keyGeneratorName: increment
t_order_item:
actualDataNodes: zookeeper_${0..2}.t_order_item_${0..2}
databaseStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: hash_mode
tableStrategy:
standard:
shardingColumn: user_id
shardingAlgorithmName: hash_mode
bindingTables:
- t_order,t_order_item
broadcastTables:
- t_config
defaultTableStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: hash_mode
defaultDatabaseStrategy:
standard:
shardingColumn: user_id
shardingAlgorithmName: hash_mode
shardingAlgorithms:
hash_mod:
type: HASH_MOD
props:
sharding-count: '3'
keyGenerators:
increment:
type: SNOWFLAKE
props:
worker-id: 1
```
----------------------------------------------------------------
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