I see,

What about if you had 3 or 4 columns that would always be unique, is there
an advantage to naming them as primary keys? does this slow inserts because
it has to check if theres a duplicate entry?


""Manuel Lemos"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello Noah,
>
> On 22-Jun-01 21:17:35, you wrote:
>
> >what are the advantages and disadvantages of primary keys and indices?
>
> A primary key is a unique index.
>
> Use indexes for the fields that will be most looked up in the first
> condition of the WHERE clause of your SQL queries, especially if your
> tables will hold many values, but beware that indexes also take disk
space.
>
>
> Regards,
> Manuel Lemos
>
> Web Programming Components using PHP Classes.
> Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
> --
> E-mail: [EMAIL PROTECTED]
> URL: http://www.mlemos.e-na.net/
> PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
> --
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to