DEV Community

Discussion on: Database Indexing

Collapse
 
jillianntish profile image
Jill

Hey arToo, thanks for catching that! I'm still pretty new to server side database work so I appreciate that feedback! You probably don't need to set that as the unique key for the exact reason you stated!

Collapse
 
artoodeeto profile image
aRtoo

hehe. cool. thanks. I was debating it by myself too. thanks again, :)

Thread Thread
 
sneezeaway profile image
Garyyyyyyy

I believe you can also index other columns as well. It doesn't have to be the primary key.

Thread Thread
 
artoodeeto profile image
aRtoo

of course you. hehe. just wondering if its still ok to index a primary key with a unique constraint.