MySQL Forums
Forum List  »  Newbie

Re: using Insert Ignore for a specific column only
Posted by: Phillip Ward
Date: November 09, 2022 06:21AM

Can;t see any problem with that, but then I don't use 'Workbench all that much and would probably just run something like this:

create unique index [index_name] 
on [table_name] ( campaign, email );

Take care which way round you define the index.
If you query the table only by email (i.e. without campaign), then the index can't help and the query will Table Scan. If you query by both fields then, of course, the index is a Big Help and even by campaign only, it will probably still get used.

Regards, Phill W.

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.