title: How does ServiceStack Redis function in retrieving data
body: <p>Not sure if it's the best title for the question... maybe someone could rename it for me?</p>
  
  <p>My question is regarding performance of reading and combining data in c# ServiceStack wrapper for Redis and how the calls work internally.</p>
  
  <p>I will explain two scenarios that will hopefully yield in a final result. One scenario has the list of category id's attached to the Transaction so that the Category can be stored independently.</p>
  
  <p><strong>Question</strong>: My end goal is to retrieve all transactions that have category 'food'.</p>
  
  <p>I have tried to number other points where clarity would help my understanding. Consider there being 10,000 transactions and each transaction had on average 3 categories.</p>
  
  <p><strong>Note:</strong> There is a related question at <a href="https://stackoverflow.com/questions/8914349/servicestack-net-redis-storing-related-objects-vs-related-object-ids?rq=1">ServiceStack.Net Redis: Storing Related Objects vs. Related Object Ids</a> however doesn't explain the efficiency.</p>
  
  <p><strong>Example A</strong></p>
  
  <pre><code>public class Transaction
  {
      public List&lt;string&gt; CategoryIds;
  }
  </code></pre>
  
  <p><strong>Example B</strong></p>
  
  <pre><code>public class Transaction
  {
      public List&lt;string&gt; CategoryNames;
  }
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <pre><code>var transactionClient = redisClient.GetTypedClient&lt;Transaction&gt;();
  
  //1. is this inefficient returning all transactions?
  //   is there any filtering available at this part?
  var allTransactions = transactionClient.GetAll();
  
  //2. In the case of Example A where the categories are stored as id's
  //   how would I map the categories to a transaction?
  //   maybe I have a List that has a container with the Transaction associated with a
  //   list of Categories, however this seems inefficient as I would have to loop 
  //   through all transactions make a call to get their Categories and then 
  //   populate the container datatype.
  
  //3. If we are taking Example B how can I efficiently just retrieve the transactions
  //   where they have a category of food.
  </code></pre>