Event Timeline
Comment Actions
Thanks @jcrespo!
Is the UNIQUE_KEY redundant now, or does the different column order mean something?
Comment Actions
@Ejegg I would definitely drop it or at least drop its uniquness. If you only do "group_id = X AND contact_id = Y" or "group_id = X" or "contact_id = Y" conditions, it is unnecessary, (PRIMARY or UI_contact_group can be used instead). There are some cases in which you may want to keep it, which is if you do something like ORDER BY contact_id,group_id mostly. Delete it otherwise.
Beware of the performance penalty too, of page splits due to inserting out-of-order.