user2428207
user2428207

Reputation: 825

UUID as PK good idea?

at the moment i an looking at a table with 210 million records. The primary key is a 36 char alphanumeric key (uuid).

Would it be better for storing to use a sequential number as PK and the UUID as normal column?

Upvotes: 2

Views: 100

Answers (1)

David Aldridge
David Aldridge

Reputation: 52386

It would be more compact, but the data would be harder to move between systems while maintaining data integrity.

So if you have to move the data, use UUID's. Otherwise, I see no benefit and some disadvantages.

Upvotes: 1

Related Questions