INDEXEs

Hi

another newbie question :smiley:

1)I have one innodb TABLE. With 2 fields, ID and VALUE. INT and VARCHAR respectively.

2)I setup ID as PRIMARY KEY.

so, in this veary silly environment, is this PRIMARY KEY a kind of mysql INDEX?

Will PRIMARY KEY help MYSQL to searchs, etc? Or I still need another INDEX?

Thanks!

Yes the primary key is an UNIQUE INDEX.
It’s just that since it uniquely identifies each record in the table it stands out and exists in (almost) every table and that is why you call it the PRIMARY KEY.

And yes it will be used to speed up searches.

Thank you Sterin!