mysql – SQL join on UID CHAR(20)?

I’d like to know if it’s ok to join multiple tables on 20 character UIDs, compared to the INT id.

The UIDs are fixed length of 20, and are generated from this character set: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.

Sample UID:


Here’s an example of a massive query that joins on IDs at the moment, but I am considering doing the joins on the UIDs:

I am aware that joining on INTs will always be faster. There are a ton of joins and I am worried it will slow down the app considerably, but I am not sure by how much, since joining on UIDs is much better maintenance wise.