i’m running a social network site and i currently have most main user data (real name, username, email, password, gender, etc) in a user table. Design-wise, would there be an performance improvement in moving the username+password to a separate table ?
I’m using mysql.
Authentication queries which only need username and password will run slightly faster, due to the smaller size of the table.
However, if you create a composite index on
(username, password_hash), it will be even faster, since the queries like this:will only need the index to run (it will show
using indexin the plan).