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
keys.

Cheers,
Olav

2012/10/11, Daniel Iwan <iwan.dan...@gmail.com>:
> 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(fetched.next().toStringUtf8());
> }
>
> 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@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>


-- 
Med Vennlig Hilsen
Olav Frengstad

Systemutvikler // FWT
+47 920 42 090

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to