mysql - Pitfall to avoid by not doing duplicate key update on tables with multiple unique indexes -
from insert-on-duplicate:
if a=1 or b=2 matches several rows, 1 row updated. in general, should try avoid using on duplicate key update clause on tables multiple unique indexes.
i confused on bold part (my emphasis).
first of unique
index can composite, right? recommendation includes these well?
practical example of pitfall avoid following recommendation?
composite primary key related in way recommendation?
i think comment refers different unique indexes rather composites: e.g. if have table 2 unique indexes:
unique index on column values:
1 2 3
and second unique index on column b values:
a b c
and insert row cola = 1
, colb = b
, existing row updated?
Comments
Post a Comment