MySQL Forums
Forum List  »  Newbie

Re: using Insert Ignore for a specific column only
Posted by: Phillip Ward
Date: November 08, 2022 05:03AM

Quote

I do not have an index on the email field ... The way it works is that users have entered their email as their login.

So in order to authenticate each User (as they log in), you need to look up their email address. That means that each email address must be unique, i.e. must identify a single User.
It also means that you definitely do need an index on email address, otherwise your log-in process is gong to get slower and slower (and slower) as the number of Users increases.

Quote

I don't want them to have two of the same employee_emails because this will screw up the rest of the logic in the app.

And you've answered your own question - you cannot have duplicate email addresses.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.