← Back to context

Comment by junek

1 year ago

Sometimes I feel bad when I generate a UUID without using it for anything. Like I've wasted it.

At work our clickstream data carries an 'event_uuid' column which combines uuid, bigint, account numbers and about 10 other identifiers. It makes joining really convenient when you don't know what column to use.

I once used `SELECT TOP 1` ... `ORDER BY NEWID()` to pick a record from a table of millions.

Millions of UUIDs generated! All so one would randomly be picked as the lowest valued and the attached record returned. Such a waste!

Seriously, this just seems like a frivolous waste of a precious and rapidly dwindling resource…