我可以在一个查询中有多个分区键吗?

Can I have multiple partition keys in one query?

我有一个范围查询,它可能涵盖多个分区。 我可以在一个查询中指定多个分区吗?我是否应该更好地 运行 每个分区查询然后加入结果?

示例:

.CreateQuery<Segment>()
.Where(s => s.PartitionKey == "A" || s.PartitionKey == "B")

我可以做包含吗?

Can I specify multiple partitions in one query?

是的,你可以做到。

Should I better run a query per partition and then join the results?

一般来说这是推荐的方法,但这在很大程度上取决于您的应用程序。我强烈建议阅读 Azure Storage Table Design Guide.

Can I do contains?

没有。 Contains 不受支持。有关支持的运算符列表,请参阅此 link:https://msdn.microsoft.com/en-us/library/azure/dd135725.aspx.