Question: I have a database table with 33265902 (thirty-three million two hundred sixty-five thousand nine hundred two) records in it.

Much of this is made up of duplicates.

It is causing me issues as any website that queries this table is causing load on the server.

What makes this table unique is two fields, email\_address and job\_id

My question is what is the best way to delete all duplicates leaving one good record per field criteria.

What is the most efficient way to do this without killing the server.

Answer: 
i would prefer creatin a new table from the existing one by using distinct value and then drop the old table then rename the new created table, so all the steps will be

```
1. select distinct columns and insert into new_table
2. drop old_table
3. rename new_table to old_table

```
I went with Gordon Lindoffs suggestion the end and seems to have worked great.

My issue now is I am left with loads of space I need to claim back for the os

Is shrinking the dB the right thing?