MongoDB does its best to store as much useful information as possible in RAM. MySQL usually does the same.
Both databases will use all of their available RAM.
Comparing the two is not easy, because it really depends on many things. Things like the structure of your table, the size of your data, and your indexes.
If you provide MongoDB and MySQL with the same amount of RAM, you will usually find the following:
- MongoDB will be very good at finding individual entries. (e.g. searching for a user or updating an entry).
- MySQL .
.