mongo: 查看创建索引的进度
使用db.ming_mark_history.createIndex({mark: 1, _id: -1}, {background: true})
进行创建索引, 但是执行一直未完成, 不知道索引的进度
在mongo sheel 中执行
db.currentOp(true).inprog.forEach(function(op){ if(op.msg!==undefined) print(op.msg) })
可以查看状态:
[
{
"0": "Index Build (background) Index Build (background): 251160/622703 40%"
},
{
"0": "step 2 of 6"
}
]
参考: https://stackoverflow.com/questions/22309268/mongodb-status-of-index-creation-job mongodb status of index creation job
评论(2)
1楼 2024-06-26 10:57:38warped games说: Wow! This blog looks exactly like my old one! It's on a totally different subject but it has pretty much the same page layout and design. Great choice of colors!
2楼 2024-11-17 13:05:05
fkttuqqhfh说: Muchas gracias. ?Como puedo iniciar sesion?