mysql - table column marked as unique, means it's indexed too, right? -


i'm trying setup mysql table. following:

id (integer, auto increment, primary) username (varchar 32, unique) email (varchar 32, unique) 

i don't want allow duplicate usernames or email addresses in table. example, @ startup, i'll test if supplied username or email exist in table - if do, i'll cancel signup.

if mark username , email columns "unique", mean they're indexed? i'd them indexed can already-exists check efficiently possible,

thanks

yes indexed. how database already-exists check efficiently possible.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -