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?

dan


-----Original Message-----
From: Rolf Hopkins [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 6 February 2001 06:31
To: Jacob Friis Larsen; [EMAIL PROTECTED]
Subject: Re: INDEX() / UNIQUE()


Why would you want to?  UNIQUE() is an INDEX() the only difference being
that UNIQUE can not have the same value a number of times whereas INDEX you
can.

----- Original Message -----
From: "Jacob Friis Larsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 06, 2001 21:38
Subject: INDEX() / UNIQUE()


> Is there any idea in using both a INDEX() and UNIQUE() index on the same
> table field ?
>
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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



---------------------------------------------------------------------
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

Reply via email to