我正在mongodb-shell
尝试了解mongodb
,并注意到db.stats()
显示的集合数量比显示的数量多 1db.getCollectionNames()
这是示例:
> db.stats();
{
"db" : "learn",
"collections" : 6,
"objects" : 47,
...
...
"ok" : 1
}
> db.getCollectionNames();
[ "hit_stats", "hits", "system.indexes", "system.profile", "unicorns" ]
所以db.stats
说有6 个集合,其中 asdb.getCollectionNames
仅列出5 个集合名称。为什么会出现这种差异?