I'm not sure why you're seeing the error, but a non-streaming list keys
operation will block until complete. To make this marginally better, you
can try to get your client to use the streaming API, but that still leaves
the problem of the list keys operation itself. List keys is expensive and,
in general, a bad idea because it walks across the entire key space of the
cluster, not just the bucket. Imagine SELECT * FROM allTheTables and you're
in the right neighborhood.

If you're using secondary indices, you can use the $keys index of your
bucket, which should be considerably faster.

If not, then maybe you could provide more info about what you're trying to
accomplish. If you can perform everything in MapReduce, that may also do
the trick.

On Monday, December 31, 2012, Kevin Burton wrote:

> I use ListKeys(). I guess the authors considered this bad also as
> everytime I call this method I get the warning '*** [CI] -> ListKeys is an
> expensive operation and should not be used in Production scenarios. ***'
>
>
> On Dec 31, 2012, at 10:37 AM, idmartin <idmcr...@gmail.com <javascript:;>>
> wrote:
>
> > Ive been using riak for about a year now and Ive always avoided trying
> to get
> > every key in a bucket because it has always given me problem after
> problem.
> >
> > Is there any proper, efficient way of retrieving all the keys of a bucket
> > for reiteration?
> >
> > Currently I am using the python client and get_keys() either crashes the
> > riak server or returns "Error getting bucket properties".
> >
> > ive set ulimit to 9000 ( soft ) 65000 ( hard )
> >
> > Can anyone give me any advice with this issue?
> >
> >
> >
> > --
> > View this message in context:
> http://riak-users.197444.n3.nabble.com/retreive-all-keys-in-bucket-nothing-but-problems-tp4026453.html
> > Sent from the Riak Users mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > riak-users mailing list
> > riak-users@lists.basho.com <javascript:;>
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com <javascript:;>
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>


-- 
---
Jeremiah Peschka
Founder, Brent Ozar Unlimited
Microsoft SQL Server MVP
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to