The total size of the messages - aggregate
db.messages.aggregate( { $group : { _id : '', size : { $sum : '$size' } } } )
{
"result": [
{
"_id": "",
"size": NumberLong("17318623")
}
],
"ok": 1
}
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
db.messages.aggregate( { $group : { _id : '', size : { $sum : '$size' } } } )
{
"result": [
{
"_id": "",
"size": NumberLong("17318623")
}
],
"ok": 1
}