> on a related but slightly different example, what would happen if you had a
> Primary Key consisting of 2 columns a & b (so the pkey enforces a unique
> combination of a & b) and then created an index on one of the columns eg b.
> Would the index on b have any effect, or does a primary key on 2 columns
> work by creating individual indexes on both columns, meaning that there are
> now 2 indexes on b and the second one would have no performance effect?
A combined index on col1 and col2 is used for col1&col2 (obviously)
and additionally for col1 alone, but not for col2 alone.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php