鍍金池/ 問答/Java  數(shù)據(jù)庫/ 查看mongo構(gòu)建索引的狀態(tài)

查看mongo構(gòu)建索引的狀態(tài)

我在mongo上構(gòu)建索引,因?yàn)閿?shù)據(jù)量特別大,我想知道構(gòu)建索引的進(jìn)度
用命令 db.currentOp();
后面怎么查看狀態(tài)呢

回答
編輯回答
涼汐

https://docs.mongodb.com/manu...

db.currentOp(
    {
      $or: [
        { op: "command", "query.createIndexes": { $exists: true } },
        { op: "none", ns: /\.system\.indexes\b/ }
      ]
    }
)
2017年10月5日 11:45