Home » Performance » MySQL » Fastest Way to Remove Duplicates
icon10.gif  Fastest Way to Remove Duplicates [message #1342] Wed, 30 May 2007 19:01 Go to previous message
GeoffreyF67  is currently offline GeoffreyF67
Messages: 21
Registered: May 2007
Junior Member

Suppose you had a table that had two columns:

ID (integer)
Sentence (varchar 255)

Due to legacy reasons, the Sentence field had duplicates in it.

What would be the quickest method to get a UNIQUE on the Sentence column as well as remove the duplicates?

The only way I've come up with so far is to rebuild the table from scratch with unique on. Since there are over 25 million rows, that's gonna take a LONG time Smile

Any bright ideas?


G-Man

Read Message
Read Message
Read Message
Previous Topic:Reorder ID column
Next Topic:Why is this query slow?
Goto Forum:

  


Current Time: Sun Jul 5 22:10:30 EDT 2009

Total time taken to generate the page: 0.01206 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.