Mongodb刪除重複數據

統計分析須要跑各個時間粒度的任務,若是異常中斷後從新選擇某個時間刪除後再跑的時候,有時候仍是會有重複的統計數據。 在mongodb中創建惟一索引時加上dropDups選項能夠解決此問題: A unique index cannot be created on a key that has pre-existing duplicate values. If you would like to cre
相關文章
相關標籤/搜索