For example, i have a table (users
) and its column is name
Case 1:
I know all "name"s values are different (unique) but i not used 'primary key' for this column
Case 2:
I know all "name"s values are different (unique) and i used 'primary key' for this column
And if i use both this querys for "Case 1" and "Case 2"
1. SELECT * FROM `users` WHERE `name` = 'Obama'
2. SELECT * FROM `users` WHERE `name` = 'Obama' LIMIT 1
Than what performance difference will be for Case 1
and Case 2
?