Listing keys again

Olav Frengstad olav at
Fri Oct 12 04:58:43 EDT 2012

Listing keys is - in my experience - fast when you only have 100K
keys, try inserting 10 million and see if you get the same results.
I don't know how the Java client handles listing keys but I always
found doing a range query on the $key index to be faster than listing


2012/10/11, Daniel Iwan <iwan.daniel at>:
> I hope someone could shed some light on this issue
> Part of our dev code is using Java RiakClient like this
> KeySource fetched = getRiakClient().listKeys(bucket);
> while (fetched.hasNext()) {
>     result.add(;
> }
> where getRiakClient() returns instance of com.basho.riak.pbc.RiakClient
> Aside of not using IRiakClient this lists keys in all keyspace and
> filters them to get those falling into the bucket.
> We are using Riak 1.2 and Riak client 1.0.5 and LevelDB
> Now, I'm trying to see how this listing (which is done only when
> machine boots) behaves when there is lots of keys in Riak
> I load some keys into it - 100k per node (3 servers) and I'm rebooting
> nodes to see what's the loading time.
> Surprisingly it's always under 50ms per bucket (I have dozen of those)
> Is there some automatic 2i creation to speed up listing keys or
> something? Some improvements in 1.2?
> Or is Riak is that quick and I should expect to fall apart on listing
> keys once I reach certain number of keys in Riak?
> Or is there other explanation for this?
> It is quite a surprise especially that as far as I know Riak client
> still have some features missing (native support of 2i?)
> Regards
> Daniel
> _______________________________________________
> riak-users mailing list
> riak-users at

Med Vennlig Hilsen
Olav Frengstad

Systemutvikler // FWT
+47 920 42 090

More information about the riak-users mailing list