开发者

UUID or GUID in database as a primary key. when should I use it and when should I not use it?

I am designing the database for social web site.

should I consider using UUID or GUID for primary key at all?

or should I not worry about it until the site gains significant number of users, a开发者_开发知识库nd it's not too late to worry about it then?


GUID/UUID is ideal in disconnected scenarios where you have disconnected clients and need to reintegrate inserted data from them.

In other situation, they have a large overhead compared with the more traditional auto incremented integer.

As you say, worry about running out of integer ids closer to the date when it matters ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜