-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I use multiple sharding rules for the same table? #31374
Comments
The data in a database can only have one storage structure. It maybe not a good practice to having more than one sharding strategies in the same table. |
|
We have a similar scenario too. For most of the requests(, which have a sharding key), it's supposed to be covered by the inline strategy. But for certain requests (, from scheduled jobs and it's about to scan the whole table), we'd want it to be split into multi-threads and each thread could use a hint to specify a certain sharding table to scan. Now the problem is, once we configured an inline strategy for the table, a hint strategy couldn't be used programmatically. |
yes, lower version can do that , but in 5.5.0 can't do that . if use 5.5.0, maybe can only use inline strategy to scan the whole table. |
我们也遇到同样的问题了,多余99%的情况采用 inline方式分表,极少数需要通过 hint的方式指定查询原逻辑表(没有分表后缀),结果发现 hint 方式不生效,版本5.2.1 |
请问哪一个版本可以? |
sharding-jdbc 4.1.1 可以,现在用的是shardingsphere-jdbc版本了,我想从sharding-jdbc 4.1.1 升级到shardingsphere-jdbc 5.5.0, 目前遇到上述问题。 |
Just as my answer, It's best not to add unnecessary complexity to ShardingSphere for some non-standard requirements. We all hope that ShardingSphere remains concise and clear. |
Shardingsphere-JDBC 5.5.0 does not support multiple sharding rules for the same table. In my business scenarios, most of the scenarios use standard rule, but in some special scenarios, I need to use hint rule. How can I configure it so that I can use two kinds of sharding rules? I read the introduction of forced routing in the official website, if I configure hint rule, I can't use other sharding rules, right?
i tried this
it got error: Only allowed 0 or 1 sharding strategy configuration.
and i tried this
it got error: Same actual data node cannot be configured in multiple logic tables in same database, logical table 't_order', actual data node 'ds_0.t_order_0'.
The text was updated successfully, but these errors were encountered: