【问题标题】:Date range queries in Azure Table storageAzure 表存储中的日期范围查询
【发布时间】:2014-02-05 06:51:20
【问题描述】:

您好,我的问题是:Windows Azure table access latency Partition keys and row keys selection 关于我在 Azure 存储帐户中组织数据的方式。我有一个表存储方案,旨在存储有关实体的信息。

大约有 4000 - 5000 个实体。实体类型有6种,类型分布大致均匀。所以每个大约 800 左右。

ParitionKey:实体类型-日期

行键:entityId

作为问题的详细信息,我一直遇到延迟问题,查询多个分区似乎需要相当长的时间。

基本上一种可能的解决方案是查询以下内容:

PartitionKey > 'EntityType-Date' and PartitionKey

这在 Windows Azure 存储资源管理器中似乎不起作用。它似乎无法识别大于小于,这是我所期望的。

我的问题是小于,大于如何工作,我是否会更好地按表类型拆分我的实体。因此我的查询是?还是我应该采用不同的方法?

PartitionKey > LowDate 和 PartitionKey

【问题讨论】:

    标签: azure azure-table-storage data-partitioning


    【解决方案1】:

    就 Azure 存储资源管理器中的查询语法而言,您需要像这样指定查询:

    (PartitionKey gt 'EntityType-Date' and PartitionKey lt EntityType-HighDate') and (RowKey eq 'EntityId')
    

    更多详情请查看此链接:http://msdn.microsoft.com/en-us/library/windowsazure/dd894031.aspx

    为了决定 PartitionKey/RowKey 以实现高效查询,我强烈建议阅读存储团队的这篇博客:http://blogs.msdn.com/b/windowsazurestorage/archive/2010/11/06/how-to-get-most-out-of-windows-azure-tables.aspx

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-02
      • 2023-04-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多