##################################################################################################################################################################
獲取集合詳情:db.iphone.stats():
mongodb的每一個集合(table)對應着一個物理文件(dbpath/database_name/collection/xxx-yyy.wt),如何查看某個集合對應的物理文件名稱呢?這個與mysql開啟了innodb_file_per_table=1一致,均是一個表對應着一個物理文件,方便管理:
#############################################
#############################################
glc-test:PRIMARY> db.iphone.stats() "ns" : "apple.iphone", "uri" : "statistics:table:apple/collection/29-3120963922244296583",
##################################################################################
獲取集合和索引詳情:db.collection_name.stats({indexDetails:true})
獲取集合中索引對應的物理文件(dbpath/database_name_index/xxx-yyy.wt):
"fetch_time_1_creation_time_1" : { "metadata" : { "formatVersion" : 8, "infoObj" : "{ \"v\" : 2, \"key\" : { \"fetch_time\" : 1, \"creation_time\" : 1 }, \"name\" : \"fetch_time_1_creation_time_1\", \"ns\" : \"eagle.weibo\" }" }, "type" : "file", "uri" : "statistics:table:eagle/index/307-3120963922244296583", "LSM" : 。。。。。
#######################################################