-
Type: Task
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Server
-
Labels:None
-
0.5
Documentation Changes
- Make a note in reference/mongo-shell explaining that empty databases are not listed.
- Explain that "use <db>" does not create a database.
Behavior Summary
Databases are created and exist after inserting the first document into a collection in the database. Databases and collections are created implicitly; however, creating a database or collection object in your client does not create a database or collection. use <db> does not create new database files.
Empty databases are not listed in the output of show dbs. This is partially storage engine dependent. MMAPv1, it's impossible to have an extant but empty database: you cannot create a database except by inserting data. Even if you later drop that data, there is a small amount of internal overhead that remains. The one exception is that before 3.0, show dbs reported the admin database as empty in some cases, but there were no corresponding. WiredTiger does not report databases that do not have data, other storage engines may have different behavior here.
- is related to
-
SERVER-18313 Commnad "show dbs" does not list all the database
- Closed