Slow performance on getting via 2i

ivenhov iwan.daniel at gmail.com
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);

        mr.addReducePhase(NamedErlangFunction.REDUCE_IDENTITY,
Args.REDUCE_PHASE_ONLY_1);
        // only return the key, to match the http rest api
        mr.addReducePhase(new JSSourceFunction("function(v) { return
v.map(function(e) { 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.

Daniel

--
View this message in context: http://riak-users.197444.n3.nabble.com/Slow-performance-on-getting-via-2i-tp3812664p3818984.html
Sent from the Riak Users mailing list archive at Nabble.com.




More information about the riak-users mailing list