Skip to content
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

订单id允许重复这个方案有疑问 #1

Open
iyuzhang opened this issue Oct 16, 2024 · 0 comments
Open

订单id允许重复这个方案有疑问 #1

iyuzhang opened this issue Oct 16, 2024 · 0 comments

Comments

@iyuzhang
Copy link

在2. 分表策略中,原文
在订单表中,order_id 允许重复,可以将该字段作为sharding key。假设单个库需要分配 10 张表可以满足业务需要,可以简单地取模计算出订单分配到哪张表。
order_id 为何可以允许重复?合理的方案不应该是利用分布式ID来解决分库下的全局唯一性。

点击跳转

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant