Re: UUID column as pimrary key?

Поиск
Список
Период
Сортировка
От Stuart Bishop
Тема Re: UUID column as pimrary key?
Дата
Msg-id AANLkTim_Zqg+NNKNxcq+qMX4vXM0FrX2DMfAGKFL=D_8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: UUID column as pimrary key?  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Ответы Re: UUID column as pimrary key?
Re: UUID column as pimrary key?
Список pgsql-general
>>> Next to that, UUID's are generated by computers. I have no doubts that
>>> the numeric space that makes up a UUID allows for collision chances as
>>> low as described, but are computers capable of generating those
>>> numbers sufficiently random that they actually achieve that low a
>>> chance? I think that's pushing it.

> The main point with the randomness of UUID's remains that you _can_ have a collision at any given moment. It's
unlikelyto ever happen, but you can't predict when it will happen if it does. The possible consequences of a collision
mattera lot in designing whether and how to handle these collisions. Maybe it doesn't matter at all, maybe you should
geta really hefty insurance, or maybe you need to evacuate the country. 

Given the math, I suspect the chance of a UUID collision generated by
a respected library is roughly the same or less than any other method
of choosing a unique id. If you are looking at these extreme
improbabilities, your SERIAL isn't guaranteed unique either when you
take into account cosmic rays flipping the right bits in your ECC
memory or on your disk platter.

So if you are worried about such things, give up now because your
application is going to have to run with hardware and software in this
universe with all its limitations.

Maybe I should start a business in providing UUID collision insurance?

--
Stuart Bishop <stuart@stuartbishop.net>
http://www.stuartbishop.net/

В списке pgsql-general по дате отправления:

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: UUID column as pimrary key?
Следующее
От: Jasen Betts
Дата:
Сообщение: Re: UUID column as pimrary key?