What is the common use case when I need to use a UUID as the primary key for a Rails application

I was researching the opensourced Rails project and saw that they use UUIDs as primary keys instead of IDs. I've seen on some blog posts that it loses the sequence that comes with auto-incrementing like we do with IDs.

Then I will try to find if the UUID should be used as the table. I've seen some of the benefits illustrated by this post , but he mentioned that it's rarely worth using a UUID unless there is a lot of traffic and multiple database servers on the website.

So, I'm wondering in real life, is it worth implementing UUIDs as the primary right from the start for an e-commerce application in Rails? Moreover, Rails 4 can now support uuid out of the box.

+3


source to share





All Articles