Listing all keys and 2i $key query on a bucket

Russell Brown russell.brown at
Sat Jan 25 14:02:13 EST 2014

On 25 Jan 2014, at 18:50, Daniel Iwan <iwan.daniel at> wrote:

> How "heavy" for the cluster are those two operations for Riak cluster 3-5
> nodes?
> Listing all keys and filtering on client side is definitely not recommended
> but is 2i query via $key for given bucket equally heavy and not recommended?

It is a coverage query, so it hits 1 / N of the vnodes in your cluster. It then folds over the whole key space for the given bucket. Riak has back pressure for 2i queries, but it is reasonably expensive operation. I recommend you try it on a test cluster, using basho_bench maybe, to set up a representative work load for your application and see if the impact is tolerable to for your application.

> On related note is there a $bucket query to find all the buckets in the
> cluster and if there is how heavy is that operation?

There is not. It would basically be traversing the entire key set.

> Thanks
> Daniel
> --
> View this message in context:
> Sent from the Riak Users mailing list archive at
> _______________________________________________
> riak-users mailing list
> riak-users at

More information about the riak-users mailing list