Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change report sample size on MongoDB Compass

I am wondering if there is a way when watching your DB collection with compass and you try to see it as Schema to change the report sample size because my current documents are let's say 5000, and the report is based on 1000.

It would be useful for me to visualize correctly a statistic data I am gathering and if it is not possible I would have to write my own visualization.

Thanks in advance!

like image 902
Yordan Kanchelov Avatar asked Sep 07 '18 09:09

Yordan Kanchelov


People also ask

Is MongoDB different from MongoDB compass?

MongoDB Compass is the official GUI for MongoDB, maintained by MongoDB itself. MongoDB Compass helps users make clever decisions about the data structure, querying, indexing, and many more actions you can perform on the database.

How does MongoDB determine data size?

Probably the quickest and easiest way to check the size of a MongoDB collection is to use the db. collection. dataSize() method. This method returns the size of the collection in bytes.


1 Answers

The sampleSize is set to 1000 documents by default and cannot be changed in MongoDB Compass.

If you are using MongoDB Atlas you will probably want to use Mongo Charts. You will need to create charts using the object ID and a specified field.

Otherwise, You will need to install Navicat for MongoDB for more comprehensive schema options.

like image 76
Malik Brown Avatar answered Oct 24 '22 05:10

Malik Brown