hello. nice post. question. do we really need to index a primary key? or just the column that we usually search. like firstName, lastName. Because primary keys are unique it'll be a constant time getting a row right? hehe. just wondering.
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!
hello. nice post. question. do we really need to index a primary key? or just the column that we usually search. like firstName, lastName. Because primary keys are unique it'll be a constant time getting a row right? hehe. just wondering.
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!
hehe. cool. thanks. I was debating it by myself too. thanks again, :)
I believe you can also index other columns as well. It doesn't have to be the primary key.
of course you. hehe. just wondering if its still ok to index a primary key with a unique constraint.