You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "lly-ke (via GitHub)" <gi...@apache.org> on 2025/09/06 14:11:39 UTC

[I] How to iterate all physical tables when using standard sharding strategy? [shardingsphere]

lly-ke opened a new issue, #36496:
URL: https://github.com/apache/shardingsphere/issues/36496

   Title
   Does ShardingSphere support using standard and hint strategies together?
   
   Description
   My usage scenario:
   
   Normal SQL queries: use standard strategy with sharding column (e.g., url_id).
   
   Batch tasks: need to iterate each physical table one by one, so I want to use HintManager.addTableShardingValue("table", n).
   
   But if I configure standard strategy in YAML, HintManager does not work at all.
   If I configure hint strategy, then I lose the standard ability.
   
   Question
   
   Is it possible to configure standard and hint strategies together for the same table?
   
   Or is there an official recommended way to handle this scenario (task iterating all physical tables)?


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] How to iterate all physical tables when using standard sharding strategy? [shardingsphere]

Posted by "lly-ke (via GitHub)" <gi...@apache.org>.
lly-ke commented on issue #36496:
URL: https://github.com/apache/shardingsphere/issues/36496#issuecomment-3262693041

   > Is the title and content describe same question?
   
   
   Yes, the title and description are related to the same problem.
   My scenario is:
   
   I want to use standard sharding for normal SQL queries (by column, e.g. url_id).
   
   But for batch tasks, I need to process data in each physical table one by one.
   In this case, I tried to use `HintManager.addTableShardingValue("link", 2).`
   
   The problem is:
   
   When a table is configured with standard strategy, the HintManager does not work at all.
   
   I also cannot configure the same logical table twice (e.g. link_standard with standard, link_hint with hint).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] How to iterate all physical tables when using standard sharding strategy? [shardingsphere]

Posted by "lly-ke (via GitHub)" <gi...@apache.org>.
lly-ke commented on issue #36496:
URL: https://github.com/apache/shardingsphere/issues/36496#issuecomment-3262735108

   I cannot configure two logical tables (link_standard with standard, link_hint with hint) for the same physical table set,
   because when starting ShardingSphere it reports an error saying that one physical table cannot have multiple sharding rules.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] How to iterate all actual tables when using standard sharding strategy? [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #36496:
URL: https://github.com/apache/shardingsphere/issues/36496#issuecomment-3263396497

   Each table can only be configured with one sharding strategy.​


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] How to iterate all actual tables when using standard sharding strategy? [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #36496: How to iterate all actual tables when using standard sharding strategy?
URL: https://github.com/apache/shardingsphere/issues/36496


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] How to iterate all physical tables when using standard sharding strategy? [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #36496:
URL: https://github.com/apache/shardingsphere/issues/36496#issuecomment-3262568034

   Is the title and content describe same question?


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] How to iterate all actual tables when using standard sharding strategy? [shardingsphere]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #36496:
URL: https://github.com/apache/shardingsphere/issues/36496#issuecomment-3294265470

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org