title: Azure Tables advanced queries
body: <p>I read somewhere that querying the data for other than RowKey and PartitionKey will result in a full table scan. I am looking to properly understand the whole query process, but I have come up a bit empty on the whole ordeal.</p>
  
  <p>Say I have a few million row's of data objects in a single storage. I have it divided into subsets of data by PartitionKey. Say I create a query along the lines of</p>
  
  <pre><code>var query = new TableQuery&lt;MyEntity&gt;()
      .Where(TableQuery.CombineFilters(
          TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, pPartition),
          TableOperators.And,
          TableQuery.GenerateFilterCondition("Timestamp", QueryComparisons.GreaterThanOrEqual, startTime));
  </code></pre>
  
  <p>How is this query constructed on the tables end? Do I have control over which filter is applied first - is it the order of applying them, so in this case I would first get a subset of say.. 100k rows and then apply the Timestamp filter.</p>
  
  <p>The reason I am contemplating this to begin with is that I want to use both the PartitionKey and RowKey to store different data for separation, but I also need to be able to query by date as efficiently as possible. The system will have fairly heavy work load with a lot of requests like this so it is important that it works in a timely fashion.</p>