title: Querying in redis
body: <p>Recently I am learning redis and honestly very impressed and dying to use it. One of the things that keep bothering me is "how do I query redis". To be specific I am trying to resolve following</p>
  
  <p>Say I have a millions of hashes stored as below</p>
  
  <pre><code>usage:1 = {created: 20100521, quantity:9, resource:1033, user:1842, ...}
  usage:2 = {created: 20100812, quantity:3, resource:7233, user:1842, ...}
  usage:3 = {created: 20100927, quantity:4, resource:1031, user:76, ...}
  </code></pre>
  
  <p>Please note that there are many keys in hashes I have shown only 4.
  Now that I want to find records in specific date range, by user, by resource or for a user in given period.</p>
  
  <p>I suspect that there are redis specific patterns to retrieve such data. I am a python programmer. I did look at redisco(ohm port) which supports some quering but I am not sure if it does get all the data and then filters in python.</p>