The feature to automatically index all of the objects in a bucket already
exists.

If you choose the LevelDB backend and enable Secondary Indexes in the
config file, you automatically get the '$bucket' index (see the 'Special
Fields' section of
http://docs.basho.com/riak/latest/cookbooks/Secondary-Indexes---Configuration/
). You can then do 2i queries on that index to list all the keys in a
bucket.

However, whether or not this will get you a significant speed-up of listing
your keys, depends on your use case, data set, ring size, etc. Meaning,
it's worth testing. And it requires choosing the LevelDB backend versus the
Bitcask backend (which does not support indices), which comes with its own
set of trade-offs.



On Thu, Apr 25, 2013 at 1:32 PM, n6mac41717 <c...@stanfordalumni.org> wrote:

> Thanks for the quick reply Dmitri!
>
> Given your insight below, I'm wondering in Riak v2.x, whether it would be
> possible to include a feature that automatically creates the index for you
> behind the scenes so that indeed GET url/bucket(s) would return the keys.
> Just a thought...
>
>
> Dmitri Zagidulin wrote
> > You're probably wondering what you should do instead of list keys, to
> > simulate the SELECT operation you're used to in relational databases.
> > The answer is - use an index of some sort. (Incidentally, with relational
> > databases, you're usually using an index, too -- very rare are the cases
> > where you're doing SELECT * on a table with no primary index).
>
>
>
>
>
> --
> View this message in context:
> http://riak-users.197444.n3.nabble.com/Getting-all-the-Keys-tp2308764p4027761.html
> Sent from the Riak Users mailing list archive at Nabble.com.
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to