indexing - mysql warning : primary key and index on the same field in MYSQL -
mysql warning : primary key , index on same field in mysql .
as in theory books these 2 terms used explain indices, in practice, when try make index on particular field primary key, mysql generates warning, although index created.
could explain?
a primary key implies index on set of columns make key, therefore second (separate) index is redundant:
the primary key table represents column or set of columns use in vital queries. has associated index, fast query performance.
so creating explicit index don't gain on contrary saddle database responsibility of having maintain 2 separate indexes.
Comments
Post a Comment