Re: PRIMARY KEY vs. INDEX
| From: | 1LT John W. Holmes | Date: | Thu, 02 May 2002 12:25:39 +0000 |
| Subject: | Re: PRIMARY KEY vs. INDEX | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95680@lists.php.net to get a copy of this message | ||
> I guess I got a very easy question for the pros here...
> I've been searching the documentaion of mySQL, but didn't
> find the answer (even though I'm sure it's out there
> somewhere :))...
>
> Is a primary key in mySQL automatically indexed? And is a
> unique field indexed automatically ?(I don't think and
> don't hope so, but one never knows)
Kind of off topic, but yes, they are both indexed. Use SHOW INDEX FROM
table_name to see the indexes.
---John Holmes...