I couldn't find an explanation of this behavior in the docs. When I
use the following CREATE command:

 CREATE TABLE D6 (id int(10) not null unique);

it appears to automatically create an index for me:

mysql> SHOW INDEX FROM D6;
+-------+------------+----------+--------------+-------------+...
| Table | Non_unique | Key_name | Seq_in_index | Column_name |...
+-------+------------+----------+--------------+-------------+...
| D6    |          0 | id       |            1 | id          |...
+-------+------------+----------+--------------+-------------+...

My actual statement is more like

 CREATE TABLE D6 (id int(10) not null unique, PRIMARY KEY (id));

...which ends up with two indexes: 'PRIMARY' and 'id', both on the id
column. I can explicity drop either, but I don't understand how the
'id' index is getting created in the first place. Is this some kind of
phantom index that I shouldn't worry about, because for some strange
reason I don't have to pay for updating the extra index or something?

Mysql version 3.23.32

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