On Fri, Nov 24, 2017 at 11:25 AM, Keith Medcalf <kmedc...@dessus.com> wrote:
> > Actually a UUID or a GUID has a 100% certainty of a collision, not just a > possibility of a collision. Just as all hash algorithms which take > something and generate a shorter "hash" or "checksum" will always have > collisions. Without exception and as an absolute 100% certainty. There is > no way to avoid this mathematical certainty. > > However, whether the absolute and unmitigatable certainty of a collision > is of any import or not is an entirely different matter. > > *I*t's also 100% certainty that collision will occur with a 32 or 64 bit row id before a UUID collision occurs. For the truly paranoid UUID can be made CUID ( https://github.com/ericelliott/cuid ) by using seconds for 32 of the 128 bits. " 1 billion UUIDs per second for about 85 years, and a file containing this many UUIDs, at 16 bytes per UUID, would be about 45 exabytes, many times larger than the largest databases currently in existence, which are on the order of hundreds of petabytes. " 85 years in seconds is 2 680 560 000, which is about 1/2 of a 32 bit number, so you can add a factor of 170 to that ... or 14,450 years before 50% collision probability. (generating a billion a second mind you for 14,000 years) _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users