Brian recently posted an article comparing UUID and auto_increment primary keys, basically advertising to use UUID instead of primary keys. I wanted to clarify this a bit as I've seen it being problems in so many cases.
First lets look at the benchmark - we do not have full schema specified in the article itself so it results are not absolutely clear but we already can have certain conclusions.
Data size is very small. What is the biggest
problem with UUID ? It is the fact inserts are going in random
locations in index tree which will require a lot of IO in case of
index tree not fitting into memory. This is not simply the case
of 32 bytes vs 4 bytes for key value - if you would use integer
key and insert data in random order you would have the same
problems.
In fact if you store UUID in binary form you can bring it down to
16 bytes so …