For the case of username, if you want to check if a username is unique, then you will have to loop through all the users, fetch their metadata and then check their usernames. This is as opposed to storing the username yourself and making that a primary key