News for hackers. Stuff that matters.
Re:Be Careful with UUID or GUID as Primary Keys by morgo on Friday June 09, 2017 @05:01PM (#14524542)
The reason is not that the indexes became larger, its that mysql has to protect against all 4 byte characters, since the standard defines the n in varchar(n) as chars not bytes. This is obviously exceedingly rare, but if if it instead truncated somewhere in the index you could get a duplicate key error for something not duplicate.

In mysql 5.7+ the default row format allows 3000+ potential bytes (up from 767 bytes), so this becomes a non issue for most cases.

There are no comments on this comment yet.