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/03/03 10:32:49 UTC
[GitHub] [incubator-shardingsphere] bharathikannan-zarget edited a comment
on issue #4478: Is this possible to just shard databases with table rule
configuration?
bharathikannan-zarget edited a comment on issue #4478: Is this possible to just shard databases with table rule configuration?
URL: https://github.com/apache/incubator-shardingsphere/issues/4478#issuecomment-593879333
@KomachiSion
```
db0
Tables:
| account
| user
| events
| history
| preferences
```
db1
```
Tables:
| account
| user
| events
| history
| preferences
```
db2
```
Tables:
| account
| user
| events
| history
| preferences
```
So let's say
```
Rules:
tenant_id < 100 => db0
tenant_id > 100 < 200 => db1
tenant_id > 200 < 300 => db2
Sample Queries:
select * from accounts where tenant_id=10; => db0
select * from history where tenant_id = 10; => db0
select * from accounts where tenant_id=180; => db1
select * from history where tenant_id = 180; => db1
```
This is the exact scenario i am facing, is it possible to solve using ShardingSphere?. I just want to do database level sharding for all the queries executed based on a column value.
----------------------------------------------------------------
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
With regards,
Apache Git Services