3
  1. Which of the ways is better for generating unique IDs for users? I am not developing a distributed system. So, is the use of UUID any helpful (future proofing?).

  2. Also, How good is integer joins vs VARCHAR joins?

  3. Or is a generation of 64 characters long UID(sha 256) better?

  4. Finally, How good is storing username (unique) next to a message data posted by a user on the mysql table rather than the user id?

Arion
  • 31,011
  • 10
  • 70
  • 88

1 Answers1

1

The MySQL Performance Blog has an article listing a few reasons why using UUIDs are bad.

I think it covers 1+3.

For 2, see this other StackOverflow question on the subject.

For 4, common knowledge is to normalize first, and de-normalize only if performance suffers.

Community
  • 1
  • 1
bhamby
  • 15,112
  • 1
  • 45
  • 66