MongoDB command
// 去重
// Index your customKey before running this to increase spee
// http://stackoverflow.com/questions/13190370/how-to-remove-duplicates-based-on-a-key-in-mongodb
db.myCollection.find({}, {myCustomKey:1}).sort({_id:1}).forEach(function(doc){
db.myCollection.remove({_id:{$gt:doc._id}, myCustomKey:doc.myCustomKey});
})