Author Topic: Predb Dupes  (Read 7293 times)

Offline jonnyboy

  • Epic Indexer
  • *****
  • Posts: 1046
  • Helpful: +93/-1
  • Lazzy Trucker
Predb Dupes
« on: 2013-07-05, 11:16:48 am »
I ran into an issue with my Predb dump and had to grab another and merge and in doing so, realized there were many dupes in the dump. To clean out the dupes, this is what I did:
for InnoDB table, you have to convert to MyIsam to get the index to take, notice I use COMPRESSED, chnage to DYNAMIC if that is what you use:

Code: [Select]
ALTER TABLE predb ENGINE MyISAM;
ALTER IGNORE TABLE predb ADD UNIQUE INDEX idx_name_title_unique ( title );
ALTER TABLE predb ENGINE=INNODB ROW_FORMAT=COMPRESSED;

for MyIsam, much easier:
Code: [Select]
ALTER IGNORE TABLE predb ADD UNIQUE INDEX idx_name_title_unique ( title );

If you want to remove the unique index after removing the dupes run:
Code: [Select]
drop index idx_name_title_unique on predb;
« Last Edit: 2013-07-05, 11:27:58 am by jonnyboy »