I am evaluating MongoDB, originating from Membased/memcached because I would like more versatility.

Obviously Membase is great in doing fast (multi)-key searches.

I love the extra options that MongoDB provides me with, but could it be also fast in doing multi-key searches? I have seen the $or and $in operator and I am i can model it with this. Among the finest to understand whether it's performant (within the same league) as Membase.

use-situation, e.g., Lucene/Solr returns 20 product-ids. Research these product-ids in Couchdb to come back paperwork/ appropriate fields.

Thanks, Geert-Jan

To use situation, I'd say it's, from the experience: I compromised some statistics right into a database of mine that made lots of $in queries with 1000's of ids also it labored fine (it had been a hack). As it turned out, it labored rather well, within the lower nanosecond area.

Obviously, it's difficult to check this, and -as always- theory is really a bad companion if this involves performance. I suppose the easiest method to decipher it would be to migrate some test data and send some queries somewhere.

Use MongoDB's excellent built-in profiler, use [cde], keep your one index per query rule in your mind, have a look in the logs, keep close track of mongostat, and perform some benchmarks. This should not take too lengthy and provide you with an absolute and affirmative answer. In case your queries come out slow, people here and in the news group most likely possess some ideas how you can enhance the exact query, or even the indexation.

One index per query. It's sometimes believed that queries on multiple secrets may use multiple indexes this isn't the situation with MongoDB. If you've got a query that chooses on multiple secrets, and also you want that query to make use of a catalog effectively, a compound-key index is necessary.


There's a lot of that page too regarding Indexes.

The end result is Mongo is going to be great in case your indexes have been in memory and you're simply indexing around the posts you need to query using composite secrets. For those who have poor indexing your performance are affected consequently. This really is virtually consistent with most systems.