1
當更改代碼,告訴我,如果指標仍然爲正確的語句find()
一個快速的方法是(nodejs
)我該如何解釋()MongoDB中的upsert來查看索引是否被使用?
collection.find(query).explain(function(err, explaination) {
console.log('MongoDebug: ' + explaination.cursor);
});
如果光標BtreeCursor
類型,使用索引。
使用insert()
與upsert: true
時如何檢查呢?
謝謝,這是一個明確的答案。我會馬上接受。 – Redsandro 2014-12-04 17:34:35