Replies: 5 comments
-
@fzyzcjy Hello, sorry for the late response. I'm interested in this one, my question is ,
How do you know that? |
Beta Was this translation helpful? Give feedback.
-
@tristaZero Hi, I know it by: Create an extra table, say, |
Beta Was this translation helpful? Give feedback.
-
That means we have to update this index table together whenever there is DML, right? Perhaps we should also use the XA protocol to guarantee this transaction involves a data table and an index table, correct? |
Beta Was this translation helpful? Give feedback.
-
Yes, IIRC, that's how Vitess does it
Yes, again Vitess seemed to do so. Not remember exactly though. Btw maybe we should make XA optional for this (e.g. users may disable it in non-critical data), because it reduces the performances a lot. |
Beta Was this translation helpful? Give feedback.
-
(For future readers: @tristaZero also has some discussion in ShardingSphere's public Slack channel around https://apacheshardingsphere.slack.com/archives/C026MLH7F34/p1678691279002849) |
Beta Was this translation helpful? Give feedback.
-
Feature Request
Related to: #24478
Hi, thanks for the package! I wonder whether it is possible to selectively broadcast to the databases that contain the data, based on non-sharding key?
Again using the dummy example in the last issue: Suppose we have a
message
table with columnschat_id
,message_id
,another_id
, withchat_id
being the sharding key. Then, we have a SQL likeSELECT ... WHERE another_id IN (100, 200, 300) AND ...
. Suppose, for simplicity, we have 64 shards, and suppose we know another_id=100,200 is in shard A and another_id=300 is in shard B. Then, ideally, shardingsphere should only send (modified) query to shard A and B, instead of all 64 shards (which is very expensive). So, is this possible? Thanks.Is your feature request related to a problem?
see above
Describe the feature you would like.
see above
Beta Was this translation helpful? Give feedback.
All reactions