Comment: Re:Short primary keys plz (Score 1) 176
Even if you don't ever plan to change a username, a username makes a poor primary key just for performance reasons. In MySQL, for example, primary keys should be kept short because every index will have a copy of every primary key.
I've had the misfortune to access the schema of an accounting system we had to use, and *every* FK was a string. Even if it was an integer. In a DB with 600+ tables, all connected. This ran on Oracle, and when I looked at the query analysis it was quite plain why it ran dog-slow even with a modest userbase. It used most of the IO and CPU on figuring out joins (I don't know the proper term, but I suspect this would not have been a problem if the FKs were ints). The table scans that ran (lots of them as well) required less resources than a single join. Changing it needs a redesign of the schema, but it can be done with minimal downtime.
When I confronted the vendor with this they blamed the oracle consultants, when I told the higher-ups in my own company that this was an abominable design they told me to shut up, and that the design must be perfect, as it was done by Oracle people. That's one of the reasons why I have no trust in what DB consultants do (I should probably become one myself, I'm pretty sure I could do a better job off the bat).