ALL COVERED TOPICS

NoSQL Benchmarks NoSQL use cases NoSQL Videos NoSQL Hybrid Solutions NoSQL Presentations Big Data Hadoop MapReduce Pig Hive Flume Oozie Sqoop HDFS ZooKeeper Cascading Cascalog BigTable Cassandra HBase Hypertable Couchbase CouchDB MongoDB OrientDB RavenDB Jackrabbit Terrastore Amazon DynamoDB Redis Riak Project Voldemort Tokyo Cabinet Kyoto Cabinet memcached Amazon SimpleDB Datomic MemcacheDB M/DB GT.M Amazon Dynamo Dynomite Mnesia Yahoo! PNUTS/Sherpa Neo4j InfoGrid Sones GraphDB InfiniteGraph AllegroGraph MarkLogic Clustrix CouchDB Case Studies MongoDB Case Studies NoSQL at Adobe NoSQL at Facebook NoSQL at Twitter

NAVIGATE MAIN CATEGORIES

Close

Redis: Optimizing for Roundtrips

Nifty one from Trenton Strong:

Using SORT and GET is fairly straightforward. We can point the SORT command at lists and sorted sets and retrieve the contents in specified order. If we use the GET clause, we can specify a pattern for keys external to the list that we would like to retrieve instead of the sorted list contents. So now we can finally dereference our references!

  redis> SORT FooBar|list BY nonexistentkey GET FooBar|id|*

Before knowing this one, I’d be looking for:

  1. variadic commands (SADD, ZADD, LPUSH, RPUSH, HMSET) available since Redis 2.4
  2. Pipelining
  3. MULTI/EXEC: available since Redis 1.1.95
  4. the upcoming Lua support

Original title and link: Redis: Optimizing for Roundtrips (NoSQL database©myNoSQL)

via: http://trentstrong.com/blog/2011/using-redis-sort-get-save-roundtrips.html