Possible Duplicate:
InnoDB: duplicate indixes found – is this very bad?
Somehow I have duplicate unique keys, indexes in my Magento Database. And not some but more than thousands.
Is there a wat to easily get rid of all this and start with a fresh database, importing only the data.
I was thinking of exporting data only
Then setup a new magento install (with new indexes)
Then copy only the data
Can this be acomplished with phpmyadmin? Or other tricks?
To give you an example:
CREATE TABLE IF NOT EXISTS `mag_catalog_product_option_type_title` (
`option_type_title_id` int(10) unsigned NOT NULL auto_increment COMMENT 'Option Type Title ID',
`option_type_id` int(10) unsigned NOT NULL default '0' COMMENT 'Option Type ID',
`store_id` smallint(5) unsigned NOT NULL default '0' COMMENT 'Store ID',
`title` varchar(255) NOT NULL COMMENT 'Title',
PRIMARY KEY (`option_type_title_id`),
UNIQUE KEY `UNQ_MAG_CAT_PRD_OPT_TYPE_TTL_OPT_TYPE_ID_STORE_ID` (`option_type_id`,`store_id`),
UNIQUE KEY `UNQ_CATALOG_PRODUCT_OPTION_TYPE_TITLE_OPTION_TYPE_ID_STORE_ID` (`option_type_id`,`store_id`),
UNIQUE KEY `UNQ_REMOVEMECAT_PRD_OPT_TYPE_TTL_OPT_TYPE_ID_STORE_ID` (`option_type_id`,`store_id`),
KEY `IDX_MAG_CATALOG_PRODUCT_OPTION_TYPE_TITLE_OPTION_TYPE_ID` (`option_type_id`),
KEY `IDX_MAG_CATALOG_PRODUCT_OPTION_TYPE_TITLE_STORE_ID` (`store_id`),
KEY `IDX_CATALOG_PRODUCT_OPTION_TYPE_TITLE_OPTION_TYPE_ID` (`option_type_id`),
KEY `IDX_CATALOG_PRODUCT_OPTION_TYPE_TITLE_STORE_ID` (`store_id`),
KEY `IDX_REMOVEMECATALOG_PRODUCT_OPTION_TYPE_TITLE_OPTION_TYPE_ID` (`option_type_id`),
KEY `IDX_REMOVEMECATALOG_PRODUCT_OPTION_TYPE_TITLE_STORE_ID` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Catalog Product Option Type Title Table' AUTO_INCREMENT=1 ;
These below can all be removed, they are duplicate
KEY IDX_CATALOG_PRODUCT_OPTION_TYPE_TITLE_OPTION_TYPE_ID (option_type_id),
KEY IDX_CATALOG_PRODUCT_OPTION_TYPE_TITLE_STORE_ID (store_id),
KEY IDX_REMOVEMECATALOG_PRODUCT_OPTION_TYPE_TITLE_OPTION_TYPE_ID (option_type_id),
KEY IDX_REMOVEMECATALOG_PRODUCT_OPTION_TYPE_TITLE_STORE_ID (store_id)
I posted an update to Magento DB repair tool here:
http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/db-repair-tool
It now also removes indexes that are NOT found in the reference database