Re: advantages/disads of primary keys and indices?
| From: | Manuel Lemos | Date: | Sat, 23 Jun 2001 01:43:19 +0000 |
| Subject: | Re: advantages/disads of primary keys and indices? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9756@lists.php.net to get a copy of this message | ||
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/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--