Skip to content

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

@iyuzhang

Description

@iyuzhang

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

点击跳转

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions