From: Nathan Hoad <nat...@getoffmalawn.com>
Date: Mon, 12 Sep 2011 16:19:46 -0700 (PDT)
Local: Mon, Sep 12 2011 7:19 pm
Subject: Re: Do $or statements in the query parameter of MapReduce use the index?
To be clear, that was for a collection with 200 million records. I
checked the disk utilization with iostat during the query, and it was a constant 98%, but performing the individual queries had very little utilization. This is what gave me the impression that the index wasn't being used. I've tried using $in and it's much more manageable, taking exactly the
However, I've compared the individual results to $in as you suggested,
Individual:
Using $in:
The output of the map reduce call indicates that the exact same amount
On Sep 10, 1:03 am, Kyle Banker <kyleban...@gmail.com> wrote:
> I don't believe that a difference of 45 minutes could possibly be
> explained by whether $or is using the index or not. > For the record, the $or does use an index, but you should actually
> query: { time: {'$gte': start, '$lte': end}, username: { $in: ['1743',
> I also suggest that you run the both the $orqueryand the individual
> On Sep 8, 9:09 pm, Nathan Hoad <nat...@getoffmalawn.com> wrote:
> > I have map and reduce functions defined as follows;
> > map = function() {
> > }
> > reduce = function (key, values) {
> > }
> > And I'm running the followingquery;
> > db.collection.mapReduce(m, r, {out:'myoutput',query: { time: {'$gte':
> > If I run thequerywithout the $or, and do two separate queries for
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||