List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:September 1 2003 12:56am
Subject:Re: spaces in index name
View as plain text  
In the last episode (Sep 01), Benjamin KRIEF said:
> hi all ,
> 
> i'm trying to improve performance of a quite big and heavily used mysql 
> set of tables.
> i want to create some indexes on this table , but before this , i'd like 
> to remove the ones created by my predecessor , which are sometimes 
> duplicate , and somtimes useless.
> 
> here is an output from show index :
> 
> -+---------------+------------+-------------------+--------------+-------------+
> C| Table         | Non_unique | Key_name          | Seq_in_index | 
> Column_name |
> -+---------------+------------+-------------------+--------------+-------------+
> A| v2easy0_users |          0 | PRIMARY           |            1 | 
> id          |
> A| v2easy0_users |          0 | PRIMARY           |            2 | 
> id          |
> A| v2easy0_users |          0 | login             |            1 | 
> login       |
> 
> first of all , i'm asking myself : why is there 2 primary keys on the 
> same column ?
> i'd want to remove the second index , but since it has the same name 
> than the first  , how would i do something like that?

That's a multi-column primary key, with the same column listed twice! 
Drop it and recreate it.

-- 
	Dan Nelson
	dnelson@stripped
Thread
spaces in index nameBenjamin KRIEF1 Sep
  • Re: spaces in index nameRoger Baklund1 Sep
  • Re: spaces in index nameDan Nelson1 Sep
  • Re: spaces in index nameMatt W1 Sep
    • Re: spaces in index nameBenjamin KRIEF1 Sep
  • Re: spaces in index nameMatt W1 Sep