Let me see if I have this concept correct (I'll be very happy if this is correct).
both primary and unique mean "each value in this column must be unique" - and how long my key length is on a primary or unique key doesn't affect this, only the size of the index file - yes?
I.e. if I had a char(20) field named username as a unique key, but set my index to 5 places, it doesn't mean that I can have an unlimited number of "franklin"s in the column, only that the index itself doesn't keep tract of "lin" at the end (or "enstein" for frankenstein).
Therefore, if the db is searching for "where username = "franklin" it goes to the index and finds frank among possible entries like franklin, frankston, and frankenstein.
If this is true it seems it's good for large dbs to have a less than full-length key but obviously if you're not doing enough you might as well not have a key at all.
thanks,
Sam