--不定时更新
1.查看索引
db.ckiPsgSegInfo.getIndexes()
2.日期大小范围查询
db.ckiPsgSegInfo.find({savedate:{$gte:new ISODate("2015-02-04 15:14:15.656")}})
3.创建唯一索引
db.ckiPsgSegInfo.ensureIndex({"psgkey":1}, {"unique":true, "dropDups":true})
其中dropDups表示去重。
--不定时更新
1.查看索引
db.ckiPsgSegInfo.getIndexes()
2.日期大小范围查询
db.ckiPsgSegInfo.find({savedate:{$gte:new ISODate("2015-02-04 15:14:15.656")}})
3.创建唯一索引
db.ckiPsgSegInfo.ensureIndex({"psgkey":1}, {"unique":true, "dropDups":true})
其中dropDups表示去重。