Fast way to find duplicate data in MongoDB

I need to find out the duplicate data content in my 40 Millions records, then I can make the unique index to my name field. [code lang="shell"] > db.collecton.aggregate([ … { $group : {_id : "$field_name", total : { $sum : 1 } } }, … { $match : { total : { $gte : […]

Fast way to find duplicate data in MongoDB Read More »