Skip to content

Instantly share code, notes, and snippets.

@PharkMillups
Created May 26, 2010 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PharkMillups/414848 to your computer and use it in GitHub Desktop.
Save PharkMillups/414848 to your computer and use it in GitHub Desktop.
BBHoss # are mapreduce queries intended to be live or batch? When I get upwards of 10,000 things in a bucket, it takes too long to run the query, like 10 seconds
drev1 # BBHoss: bucket based queries are not recommended in production. the queries work best against a known list of bucket/key pairs
BBHoss # drev1: is that a new feature?
drev1 # which?
BBHoss # querying over bucket-key pairs
drev1 # no, the system was designed to accept {Bucket, Key} inputs. I believe the bucket based queries was added on top
BBHoss # drev1: so if i have a database full of items, how would i query them for an autocomplete-like dropdown box?
drev1 # I've been using ElasticSearch to search my documents with Riak providing the persistent storage
benblack # BBHoss: i'm not expert on the subject, but generally you would probably want to have a document that acted as an index so you could just retrieve it in a single call rather than iterating over your entire bucket every time
BBHoss # benblack: so a single objects with 10s of thousands of hashes?
benblack # quite possibly, yes
rtilder joined #riak
scootsm # BBHoss: If you look at the pbclient I'm working on, you can list_buckets / list_keys.
BBHoss: Debating how to use it, while being mindful of performance. Does listing the keys inside a bucket cause a performance hit? well, obviously some Err, that wasn't a question to you, BBHoss. Just a general one
BBHoss # scootsm: yeah i think thats really expensive
scootsm # listing the keys would allow you to build a cache and query that way.
BBHoss # i think with riak, you are better off maintaining your own "caches" with links or keys of documents
scootsm # yeah, I think so. Although, listing keys (a lot of em) returns seemingly faster than listing buckets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment