dbpath下是清一色的collection-n-***与index-n-***开头的物理文件,如何知道某一个集合与其对应与其对应的物理文件? 

MongoDB 集合(Collection)对应的物理文件

db.collection_name.stats()
返回的结果包含集合数据对应的物理文件
db.collection_name.stats({indexDetails:true})
返回的结果包含集合数据和索引对应的物理文件

MongoDB 集合(Collection)对应的物理文件

官方有db.collection.stats用法的详细信息:https://docs.mongodb.com/manual/reference/method/db.collection.stats/

 

MongoDB 集合(Collection)对应的物理文件

相关文章:

  • 2022-12-23
  • 2021-12-13
  • 2021-07-09
  • 2021-11-19
  • 2022-12-23
  • 2021-10-15
猜你喜欢
  • 2021-08-28
  • 2022-12-23
  • 2021-07-05
  • 2021-06-18
  • 2021-08-23
  • 2022-12-23
相关资源
相似解决方案