What’s your opinion on using UUIDs as database row identifiers, particularly in web apps?

I can’t say about the web side of your question. But uuids are great for n-tier applications. PK generation can be decentralized: each client generates it’s own pk without risk of collision.
And the speed difference is generally small.

Make sure your database supports an efficient storage datatype (16 bytes, 128 bits).
At the very least you can encode the uuid string in base64 and use char(22).

I’ve used them extensively with Firebird and do recommend.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)