[dev] Redundant index in table mnemo_memos?

Luciano Ramalho luciano at ramalho.org
Fri Aug 18 06:16:21 PDT 2006


In the definition of table mnemo_memos we have:

    PRIMARY KEY (memo_owner, memo_id)

and then

    CREATE INDEX mnemo_notepad_idx ON mnemo_memos (memo_owner);

When I look at that table structure in phpMyAdmin, it warns:

    PRIMARY and INDEX keys should not both be set for column `memo_owner`

I've read somewhere that having an index on the same field (memo_owner 
in this case) that leads a primary key is redundant, at least in MySQL.


Cheers,

Luciano










More information about the dev mailing list