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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -