Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've imported 500k rows from an Oracle database to Mongodb to make some test. No indexes were added to the mongo collection.

I ran a query which did one aggregation on a column and one filtering on other column.

The result was the MongoDb query (aggregation framework) was 5 times slower then the oracles.

I'm just starting with MongoDb so maybe I'm missing something ?


migration rejected from Jul 31 '15 at 20:14

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as primarily opinion-based by Paul White, Max Vernon, RolandoMySQLDBA, Colin 't Hart, Kin Jul 31 '15 at 20:14

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

"maybe I'm missing something" - indexes? – Sergio Tulentsev May 30 '13 at 9:07
The aggregation framework is still slower than SQLs own in places atm, specifically $grouping and what not however, as Sergio says: what about indexes? I mean Oracle has indexes right? – Sammaye May 30 '13 at 9:07
it also depends on your model. RDMBS and NoSQL are very different worlds. I'm not sure query benchmark are relevant, because you won't build your application the same manner with nosql or rdbms – Steve B May 30 '13 at 9:08
I used to store unstructured data (data I didn't care about normalizing, data I knew almost no one would ever want to aggregate) into blob columns. For the arguments above, I don't understand the point of comparing what are essentially mongodb blob operations with ANSI SQL non-blob operations. I do, however, see comparing blob to blob performance. Does anyone have any numbers for storing a json syntaxed blob in an oracle two column table (pk, blob) with varying sizes like 512K, 2K, 4K, 200M as compared to mongodb? – user71855 Jul 31 '15 at 17:13

If you run query and columns in filter/group are not presented in index than data will be retreived from the table itself. Running query with columns included into the index will use index data only and in this case query will be executed much faster.


Not the answer you're looking for? Browse other questions tagged or ask your own question.