[SERVER-18450] the relationship between real collections' names and those in file system Created: 13/May/15  Updated: 14/May/15  Resolved: 13/May/15

Status: Closed
Project: Core Server
Component/s: WiredTiger
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: DaixiShi Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File wiredtiger.png    
Participants:

 Description   

I use MongoDB 3.0 with WiredTiger storage engine.
When I checked my Mongo files in dbPath, I saw the names of the files with the formats as the attachment picture shows.

How can I know the relationship between these file names and real collections' names except the way of data size??



 Comments   
Comment by DaixiShi [ 14/May/15 ]

Your two answers are really helpful and thank you !!!

Comment by Daniel Pasette (Inactive) [ 13/May/15 ]

More specifically, the file name of your table is displayed in the stats() output in the wiredTiger.uri field.

So, if I'm looking for the file name of the collection startup_log in the database local, I would type the following from the MongoDB shell:

> show dbs
local  0.000GB
test   0.000GB
> use local
switched to db local
> show tables
startup_log
> show tables
startup_log
> db.startup_log.stats().wiredTiger.uri
statistics:table:collection-0-1584317238616370015   <==== this is the corresponding collection name

Comment by Ramon Fernandez Marina [ 13/May/15 ]

tottishi05, you can get more information by running db.collection.stats(). You may also want to explore using the --directoryperdb option.

Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience.

Regards,
Ramón.

Generated at Thu Feb 08 03:47:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.