3 years after you posted this question, I felt that I had to say something. Given that this question arises when other developers with the same problem as yours try to make a decision on such a structured table.
Not to mention many, I want to give you a scenario: imagine that you have a task to manually check if these two values value1 = 1223611547921cvdfr and value2 = 1223611547921cvdfr ... What would you do? Well, the right step is to compare each character between two values from start to finish. And then *seconds later, when you're done, you say, well, these values are the same.
But what happens if you compare these two values, value1 = 2 and value2 = 2 ? For a split second you say "they are the same."
The same scenario happens with computers, complex values lead to an increase in the time of comparison or loading. Often this time, little can be noticed, but what happens if you launch a site such as Facebook, where billions of users enter the network each time?
Thus, SELECT user_id WHERE id = "1" faster than SELECT user_id WHERE token = "dki3j4rf9u3e40..."
Sometimes it’s about simplicity, and simplicity is the preferred way in modern programming. I have seen developers using the wrong methods while they keep saying "this is my preference." Often, what you prefer leads to poor coding, it is important to remain vigilant and look for patterns of modern design as technology develops.
source share