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

请问wuid生成的id拿来做主键合适吗 #9

Closed
noprom opened this issue Oct 5, 2019 · 2 comments
Closed

请问wuid生成的id拿来做主键合适吗 #9

noprom opened this issue Oct 5, 2019 · 2 comments

Comments

@noprom
Copy link

noprom commented Oct 5, 2019

假如用wuid来表示一个订单的ID, 存储到数据里里面推荐用它的字符串表示还是直接用数字呢?
如果存储的是数字, wuid返回uint64类型, 拿来做主键合适吗?

@noprom noprom changed the title 请问wuid生成的id拿来做tidb的主键合适吗 请问wuid生成的id拿来做主键合适吗 Oct 5, 2019
@edwingeng
Copy link
Owner

抱歉,十一出游期间看到,没回,就忘了。

wuid 的设计目标之一就是用来做数据库主键,就用 uint64,没问题

@noprom
Copy link
Author

noprom commented Oct 29, 2019

好的,非常感谢。

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

2 participants