Most efficient way to determine if 1000 specific keys exist?

Jeremiah Peschka jeremiah.peschka at gmail.com
Wed May 2 16:54:58 EDT 2012


You can use the $keys index to grab this information out of Riak. You could also write an MR job that returns just the key for every key that exists, but you would still have to read everything from disk... Or I think so, could be wrong.

---
Jeremiah Peschka, Managing Director, Brent Ozar PLF, LLC
Microsoft SQL Server MVP

On May 2, 2012, at 11:47 AM, Tim Haines <tmhaines at gmail.com> wrote:

> Hey guys,
> 
> Still a relative newbie here.
> 
> I was hoping to be able to setup a MapReduce job that I could feed 1000 keys to, and have it tell me of the 1000, which keys exist in the bucket.  I was hoping this could use the key index (such a thing exists right?) without having to read the objects.
> 
> The methods I've tried for doing this fail when the first non-existing key is found though.
> 
> Is there a way to do this?
> 
> Or alternatively, is there a way to check for the presence of one key at a time without riak having to read the object?
> 
> Cheers,
> 
> Tim.
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com




More information about the riak-users mailing list