Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

In the documentation for myisamchk, it says:

--quick, -q

Achieve a faster repair by modifying only the index file, not the data file. You can specify this option twice to force myisamchk to modify the original data file in case of duplicate keys.

Does this really mean to execute the command like myisamchk -qq table_name??? In fact, I tried this, but I still get many errors of the form:

myisamchk: warning: Duplicate key for record x against record at y

Can I assume that myisamchk is correctly deleting duplicates? As a side-question, what is a good way to check a table for duplicates?

Per request, results of SHOW CREATE TABLE:

Table: entities5
Create Table: CREATE TABLE `entities5` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`ext_id` bigint(20) unsigned NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`first_name` varchar(130) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`last_name` varchar(130) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`locale` char(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`gender` tinyint(1) DEFAULT NULL,
`username` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`name`,`id`),
UNIQUE KEY `ext_id` (`ext_id`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
share|improve this question
    
Please show the table structure using SHOW CREATE TABLE mytable\G –  RolandoMySQLDBA Sep 21 '12 at 8:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.