Sunday, 15 April 2012

performance - mongoDB Aggregate-Framework gets slow after adding Index -



performance - mongoDB Aggregate-Framework gets slow after adding Index -

i've got 2 duplicated collection same information.

properties mongodb: - version 2.6 - vm 4-core , 8gb ram

properties of collection: - 2.200.000 documents - 10gb per collection

to info out of it, utilize aggregation framework. works well, takes long 70 seconds.

class="lang-js prettyprint-override">db.coll.aggregate( [{ $group: { _id: { owner: "$owner", category__: "$category__" }, value: { $sum: "$value" } } }])

so implement index on owner , category.... if execute same query, takes 150 seconds!

does knows reason these contradicting results?

additional: including $match can increment performance. (25 sec)

performance mongodb indexing aggregation-framework

No comments:

Post a Comment