Slow performance on getting via 2i

ivenhov iwan.daniel at
Mon Mar 12 07:36:55 EDT 2012

Excuse my doubel-posting and replying to my own thread.
I found this in PBClientAdapter class in fetchIndex method

        final MapReduce mr = new IndexMapReduce(this, indexQuery);

        // only return the key, to match the http rest api
        mr.addReducePhase(new JSSourceFunction("function(v) { return { return e[1]; }); }"), Args.REDUCE_PHASE_ONLY_1);

This means it uses map reduce and JavaScript for protocol buffers.
Would that be the reason of slow performance with thousands of keys?
In my case it more performant to list all the keys than do 2i query.

I'm using java client 1.0.4 and riak cluster 1.1.1
Any feedback appreciated.


View this message in context:
Sent from the Riak Users mailing list archive at

More information about the riak-users mailing list