title: Azure tables: how to use partition key and row key when entities have only one key?
body: <p>My understanding is that in an Azure table, each entity has a composite key made up of the <strong>partition key</strong> and <strong>row key</strong>, and the <strong>partition key</strong> should be used as a category which entities are grouped by, with the <strong>row key</strong> being a unique id for a particular entity within a category.</p>
  
  <p>However, I want to store a table of extremely simple entities which have just one simple key, and I'm not sure of what roles the <strong>partition key</strong> and <strong>row key</strong> should play for such an entity.</p>
  
  <p><em>for example</em></p>
  
  <pre><code>part : { id: '00001',
           name: 'wotsit',
           weight: '50kg' }
  </code></pre>
  
  <p>Semantically, it feels most correct to store <code>id</code> as the <strong>row key</strong> and use the same, probably blank, <strong>partition key</strong> for all entities (i.e. they're all in the same, default category). However I'm far more interested in getting maximum lookup performance than table semantics. I can easily abstract this away in the code.</p>
  
  <p>So my question is, <strong>how should I use partition key / row key when entities have only one simple key to get maximum lookup performance</strong>?</p>
  
  <p>My guess is that storing <code>id</code> as the <strong>partition key</strong>, and using a blank <strong>row key</strong> for every entity, would be best as the <strong>partition key</strong> is looked up first in queries?</p>