SomeUser
SomeUser

Reputation: 2041

is it true that Mongo keeps full database in ram?

how much ram needs mongo in comparison with MySQL?

Upvotes: 3

Views: 662

Answers (2)

dm.
dm.

Reputation: 2002

The short answer is : the same.

Another way to ask is: if I am using MySQL + memcached, how much ram do i need to use Mongo instead of that combination? The answer would be on the order of the same total amount of memory for both clusters (the mongodb cluster being sharded probably in this scenario).

Upvotes: 0

Gates VP
Gates VP

Reputation: 45277

MongoDB does its best to keep as much useful information in RAM. MySQL generally does the same thing.

Both databases will use all of the RAM they have available.

Comparing the two is not easy, because it really depends on a lot of things. Things like your table structure and your data size and your indexes.

If you give MongoDB and MySQL the same amount of RAM, you will typically find the following:

  1. MongoDB will be very good at finding individual records. (like looking up a user or updating an entry)
  2. MySQL will be very good at loading and using sets of related data.

The performance will really be dictated by your usage of the database.

Upvotes: 6

Related Questions