[plug] auto-increment in mysql
Hook
hooker at iinet.net.au
Thu Jan 2 05:57:34 WST 2003
Arie Hol wrote:
> Indexes are 'unique' fields in a table - and cannot in any way be
duplicated
> (otherwise point less having an index) - thus to increase the efficiency
it
> is often better to have an auto-increment as an index in a table.
Not so. A primary key is by definition unique, and an index can be defined
as holding only unique values, but in general an index is just a short way
of finding data, there's no need for uniqueness. Most of the indexes into
database tables that I've used/created aren't unique (except for
auto_increment fields of course).
The Hooker
More information about the plug
mailing list