

Basho Blog: Secondary Indexes In Riak - RKlophaus
http://blog.basho.com/2011/09/14/Secondary-Indexes-in-Riak/

======
mbreese
Why return the primary key when performing a secondary index query instead of
the whole record? This seems like it would add an extra round-trip. Would it
be possible add a flag to return the whole record?

~~~
RKlophaus
Excellent suggestion, and something we're already considering for a future
release.

Our current reasoning is that if you are only pulling back one or two objects,
then an extra round trip probably isn't that bad. If you're pulling back many
objects for processing, then you might be better off feeding the query results
into a MapReduce job so that it runs in parallel across the cluster.

------
jrecursive
Given the current way [Riak] index queries are expressed, I was reminded of
the unfortunately named HTSQL; I'm not sure if I am fond of it or not yet, but
I thought I'd pass along a few references as it bears some at least
superficial similarity to what exists in Riak at the moment, and that may be
of use:

<http://en.wikipedia.org/wiki/HTSQL>

<http://htsql.org/doc/ref/index.html>

