2i for single-result lookup

Greg Pascale greg at clipboard.com
Mon Nov 7 20:45:10 EST 2011


I'm thinking about using 2i for a certain piece of my system, but I'm worried that the document-based partitioning may make it suboptimal.

The issue is that the secondary fields I want to query over (email and username) are unique, so each will only ever map to one value. Since 2i queries a coverage set, but I'm only ever looking for one result, it's going to be hitting n-1 machines needlessly.

So, what I'm looking to understand is how much overhead a single-result 2i lookup like this will incur vs. a primary-key lookup, or even vs. search. Search doesn't intuitively feel like the right tool here, but I wonder if it may actually be preferable since it uses term-based partitioning.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20111107/71c7e806/attachment.html>

More information about the riak-users mailing list