On Tue, Apr 22, 2014 at 8:36 PM, Dominique Devienne <ddevie...@gmail.com> wrote: > On Tue, Apr 22, 2014 at 8:16 PM, Richard Hipp <d...@sqlite.org> wrote: >> On Tue, Apr 22, 2014 at 2:06 PM, Dominique Devienne >> <ddevie...@gmail.com>wrote: >> >>> Regarding the uniqueness argument made by DRH, it's actually very hard >>> to generate 2 random-based GUIDS [that collide], given that a 128-bit is a >>> very very large number. >> >> This is called the "Birthday Paradox". Ask Google for more information. > > Thanks for that Richard. Live and learn ;)
Actually, that Wikipedia article has the number of GUIDs necessary to achieve a given probability of collisions in http://en.wikipedia.org/wiki/Birthday_problem#Probability_table and even goes to mention "For comparison, 10e−18 to 10e−15 is the uncorrectable bit error rate of a typical hard disk.[6] In theory, 128-bit hash functions, such as MD5, should stay within that range until about 820 billion documents, even if its possible outputs are many more" So even generating a trillion 128-bit GUID, the probability of a collision is still astonishingly small, in the same order as hard disk error rates :) That's good enough for me! --DD _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users