You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "fzyzcjy (via GitHub)" <gi...@apache.org> on 2023/03/07 02:17:28 UTC

[GitHub] [shardingsphere] fzyzcjy opened a new issue, #24478: "secondary vindex" (Vitess) analogy in Shardingsphere?

fzyzcjy opened a new issue, #24478:
URL: https://github.com/apache/shardingsphere/issues/24478

   ## Feature Request
   
   Hi thanks for the library! I wonder whether there is something like "secondary vindex" (a term in Vitess) in Shardingsphere?
   
   What is "secondary vindex": https://vitess.io/docs/15.0/reference/features/vindexes/#secondary-vindexes. For (a very simplified) example, suppose we have a `message` table with columns `chat_id`, `message_id`, `another_id`, with `chat_id` being the sharding key. Then, when we have a SQL like `SELECT ... WHERE another_id = 42`, the naive solution will make the SQL be broadcasted to *all* sharded databases, because it does not contain the sharding key in the query. However, if we have a "secondary vindex", it is similar to an auto-managed table, with column `another_id` and `chat_id`, and shard key being `another_id`. Then, the engine can use this table to know chat_id, and thus rewrite the original query with a chat_id value, thus quite fast.
   
   ### Is your feature request related to a problem?
   
   Yes. Like the super-simplified example above, my database does contain (a lot of) such queries, and broadcasting to all tables is too slow.
   
   ### Describe the feature you would like.
   
   (see above)


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


[GitHub] [shardingsphere] strongduanmu commented on issue #24478: (Willing to PR) "secondary vindex" (Vitess) analogy in Shardingsphere?

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

   Hi @fzyzcjy, we are currently undergoing metadata refactoring, and global secondary indexes will rely on new metadata capabilities, such as index state maintenance and index creation schedule maintenance, which are currently not available. 
   @fzyzcjy Are you interested in getting involved in metadata refactoring?


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


[GitHub] [shardingsphere] fzyzcjy commented on issue #24478: (Willing to PR) "secondary vindex" (Vitess) analogy in Shardingsphere?

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

   @strongduanmu Hi thank you. I have already replied in the slack channel :)


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