Does including a non-key property in a table query force a full table scan

Does including a non-key property in a table query force a full table scan

Does including a non-key property in a table query force a full table scan? For example, does the following query cause a full scan even though the entity range is very, very specific?

"(PartitionKey eq 'mike') and (RowKey ge '1000:') and (RowKey lt '2000;') and (TypeName = 'blue')"

Since you're using PartitionKey in your query, this should not do full table scan. I would suggest you rewrite the query like the following below and see if it improves the performance:

"(PartitionKey eq 'mike') and ((RowKey ge '1000:') and (RowKey lt '2000:') and (TypeName = 'blue'))"

I just enclosed the 2nd part of the query in another set of brackets so that first it will find 'mike' partition and then execute rest of the query on that partition.

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright