We did a very simple test, comparing different data types and found that queries joining on binary or integers is significantly faster than the char data type.
My previously posted benchmark is definitely misleading based on our new knowledge. The benchmark was based on another’s benchmark script and didn’t utilized indexes.
With indexes, the three data types performs equally in simple index lookups cases.
If UUIDs is an requirement, like in our application, I would definitely go with the binary(16) over char(32). This will both improve performance and reduce space consumption. Otherwise, use integers whenever possible.