MongoDB view database and table size

Source: Internet
Author: User

1. View the database

>db.stats (); {   "DB":"Test",        //Current Database"Collections": 3,//How many tables are in the current database"Objects": 4,//Current Database All tables how many data"avgobjsize": 51,//average size of each piece of data"datasize": 204,//total size of all data"storagesize": 16384,//disk size for all data"numextents": 3,   "Indexes": 1,//Number of indexes"indexsize": 8176,//Index Size"fileSize": 201326592,//file size pre-allocated to the database"Nssizemb": 16,   "datafileversion" : {     "Major": 4,     "Minor": 5   },   "OK": 1 }

2. View database tables

db.posts.stats (); {   "NS":"test.posts",   "Count": 1,   "size": 56,   "avgobjsize": 56,   "storagesize": 8192,   "numextents": 1,   "nindexes": 1,   "lastextentsize": 8192,    "Paddingfactor": 1,   "Systemflags": 1,   "userflags": 0,   "totalindexsize": 8176,    "indexsizes" : {     "_id_": 8176   },   "OK": 1 }

MongoDB view database and table size

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.