[SERVER-3974] show size of collections when doing "show collections" Created: 29/Sep/11  Updated: 21/Aug/18  Resolved: 21/Aug/18

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

Type: New Feature Priority: Trivial - P5
Reporter: Daniel Crosta Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Won't Fix Votes: 0
Labels: platforms-re-triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

or show tables, which is an alias for show collections



 Comments   
Comment by Matt Lord (Inactive) [ 21/Aug/18 ]

Hi dcrosta,

I'd prefer to keep the "show collections" output simple and continue providing collection size and other stats using the .stats() method:

test@mongolord> version()
4.0.1
test@mongolord> db.version()
4.0.1
 
test@mongolord> show collections
foo
test
 
test@mongolord> db.foo.stats()
{
	"ns" : "test.foo",
	"size" : 55,
	"count" : 1,
	"avgObjSize" : 55,
	"storageSize" : 16384,
...

I'm going to close this as "Won't Fix" for now, but if I missed something please let me know.

Thank you for using MongoDB!
 

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