在查询多天青RowKeys [英] Query multiple RowKeys in Azure
问题描述
<一个href=\"http://social.msdn.microsoft.com/Forums/windowsazure/en-us/d7765773-74b8-4860-b07c-b9731a2210c7/performance-of-range-queries-on-partition-keys-and-row-keys\"相对=nofollow>这篇文章从2010年说
Query7:PartitionKey ==A和(RowKey ==A或RowKey ==F)
这导致扫描整个分区A。
这仍然是当前版本的Azure的?
的情况下我应该preFER两个并行查询或当我的分区只包含〜20行以上的语法?
我发现从<一个答案href=\"http://social.msdn.microsoft.com/Forums/windowsazure/en-US/5160b393-6f40-4354-86a0-8357cb6cf5d6/best-way-to-select-different-unrelated-records-using-rowkey\"相对=nofollow>乔贾尔迪诺,微软:
如果你想一些非连续的行键,然后发出独立但
以下表格并行各个查询将有更好的表现。什么时候
您同时指定PartitionKey和RowKey查询被认为是
PointQuery,这是最高效的选择。
块引用>A)PartitionKey ==MyPK&放大器;&安培; RowKey ==FirstRK
B)PartitionKey ==MyPK&放大器;&安培; RowKey ==SecondRKQuery7: PartitionKey == "A" and (RowKey == "A" or RowKey == "F") This results in scanning the entire Partition "A".
Is this still the case for the current version of Azure?
Should I prefer two parallel queries or the syntax above when my partition contains only ~20 rows?
解决方案I found an answer from Joe Giardino, Microsoft:
If you want several non contiguous row keys, then issuing separate but parallel individual queries of below form will perform better. When you specify both PartitionKey and RowKey the query is considered a "PointQuery" which is the most performant option.
a) PartitionKey == "MyPK" && RowKey == "FirstRK" b) PartitionKey == "MyPK" && RowKey == "SecondRK"
这篇关于在查询多天青RowKeys的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!