会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
darling
博客园
首页
新随笔
联系
订阅
管理
2021年4月21日
mongoDb增加索引,过期对象的两种方式
摘要: 通过设置TTL使集合中的数据过期 1,在特定的时间过期文档 (根据expireAt 字段的时间值进行过期) db.ediInterfaceDocment.createIndex({"expireAt":1},{ expireAfterSeconds: 0 }) 2,添加单升序索引 db.getCol
阅读全文
posted @ 2021-04-21 13:22 darling331
阅读(207)
评论(0)
推荐(0)
编辑
公告