I just import my Mysql database (size 2,8 Mio) in my new Mongo database with very simple php script i build, import was ok without error but when i look my Mongo database (with RockMongo) i can see this : Data Size 8.01m, Storage Size 13.7m.
MongoDB is bigger than Mysql for the same amount of data, is this normal ?
Thanks for your help and sorry for my english.
The default size of GridFS chunks in MongoDB is 255 KB, as per the order GridFS will divide our documents into the number of chunks file. MongoDB GridFS is using two collections to store this type of documents.
MongoDB requires approximately 1 GB of RAM per 100.000 assets. If the system has to start swapping memory to disk, this will have a severely negative impact on performance and should be avoided.
Modern big data databases such as MongoDB are engineered to readily accommodate the need for variety—not just multiple data types, but a wide range of enabling infrastructure, including scale-out storage architecture and concurrent processing environments.
Yes, MongoDB is good for small projects. MongoDB is an amazing database technology that will let you structure small sets of data however you want into a small file size. With that said, the best tools and resources for you depends on the project and the data you are storing.
Yes, it's normal that the "same" data will take up more space in mongodb. There's a few things you need to take into account:
1) the document _id that's stored for each document (unless you are specifying your own value for that) is 12 bytes per doc
2) you're storing the key for each key-value pair in each document, whereas in MySql the column name is not stored for every single row so you have that extra overhead in your mongodb documents too. One way to reduce this is to use shortened key names ("column names") in your docs
3) mongodb automatically adds padding to allow documents to grow
In similar tests, loading data from SQL Server to MongoDB, with shortened 2 character document key names instead of the full names as per SQL Server, I see about 25-30% extra space being used in MongoDB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With