简体   繁体   中英

Which database takes up more disk space MongoDB or MySQL?

I have a large database in MongoDB volume of 25gb, because of complex queries aggregation MongoDB cope worse than MySQL, but there is a fear that MySQL will take much more space on disk, is there any way to know the approximate size of the database but in MySQL? Perhaps someone has already done a comparison of these databases in terms of size?

The answer depends on a lot of choices specific to your database, such as:

  • MongoDB storage engine
  • MySQL storage engine
  • Number of indexes
  • Data types of indexed and non-indexed columns
  • Compression options used in either brand of database
  • Probably other factors

The best way to get an accurate comparison is to try it yourself using your data and your data model.

See also my answer to https://stackoverflow.com/a/66873904/20860

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM