Q: would it be true that CHAR(36) does provide some performance gain?
No, not with InnoDB. (The question earlier discusses values of 64 characters.)
There are a lot of factors that will have much more impact on performance than the difference between CHAR(64)
vs VARCHAR(64)
column.
In theory (without any bench testing), the CHAR
column will cost us not just extra "disk space", but will require more I/O (fewer rows per block), more memory for InnoDB block cache, more data written to the InnoDB log (binary logging), more time for backup, and so on. (It's not just "disk space", it's time required to read and write from the disk, including backups, etc.)
This isn't to say that we couldn't setup a test that would show a slight performance benefit to the CHAR column. But that test would likely not emulate any real world workload.
If the values we are storing are always 64 characters, or close to 64 characters, then the CHAR would be the way to go. But if the values we are storing are frequently much shorter than 64 characters, the we'd opt for VARCHAR.