I have a user table where there are hundreds of millions of rows and a user name field (varchar), should I make it the primary key instead of a unique index? What are the advantages or disadvantages of adding an additional user_id (int) field and making a primary key instead? I do not see where I will use user_id, except to say about the state of the connection, where the union in int will be faster than the union on varchar? or that? (since both fields are indexed)
update: suppose changing a username is not an option.
user157195
source
share