Need to understand INDEX and PKEYS
Hi,
I am not 100% happy with my understanding of indexes and primary keys.
I have a table with ID, Author and Text, (ID is auto increment)
Most of the select I do is "SELECT * from Table where ID = someID"
and then I with the result I do "SELECT Text, Author from Table where Author
= someAuthor"
It all works fine enough, (because I only have 400 records), but I don't
have a primary key or an index.
What primary key/index should I create?
And where could I find a simple tutorial/help on primary keys and indexes to
help me understand them once and for all.
Many thanks
Simon
|