-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Storage Execution
Hi Team,
Currently, when we show the collection stats we show the following values (among many others, of course):
- https://www.mongodb.com/docs/manual/reference/command/collStats/#mongodb-data-collStats.storageSize
- https://www.mongodb.com/docs/manual/reference/command/collStats/#mongodb-data-collStats.freeStorageSize
- https://www.mongodb.com/docs/manual/reference/command/collStats/#mongodb-data-collStats.totalIndexSize
- https://www.mongodb.com/docs/manual/reference/command/collStats/#mongodb-data-collStats.totalSize
Similarly to what we show in the database stats, it would be helpful if we added the following totals:
- totalIndexFreeStorageSize: sum of the free (re-usable) space for all indexes on the collection.
- totalFreeStorageSize: sum of the free (re-usable) space for all indexes on the collection + the collection itself.
Since we already show totals for indexes (totalIndexSize and totalSize) I assume this won't result in any meaningful extra work that might hurt performance but that's an aspect that should be considered as deployments with many indexes for a collection might be affected if meaningful additional work is needed to add the proposed totals. If that's the case, we could safeguard showing these totals under a specific option for the collection stats command.
This doesn't affect a specific version, it's something that it would be good to consider for all of them as long as back-porting is possible.
Regards
Diego