- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
GET/Product()?$filter=((PartitionKey%20eq%20'lIkfA81JpTmv')%20and%20(RowKey%20eq%20''))
%20或%20((PartitionKey%20eq%20'lIGcEmrr7hWz')%20和%20(RowKey%20eq%20''))
%20或%20((PartitionKey%20eq%20'lIAoy6PqeMVn')%20和%20(RowKey%20eq%20''))
%20或%20((PartitionKey%20eq%20'lIjETAtuhYGM')%20和%20(RowKey%20eq%20''))
%20或%20((PartitionKey%20eq%20'lIHa0znP5qAk')%20和%20(RowKey%20eq%20''))
%20或%20((PartitionKey%20eq%20'lIOCaSXg9YE7')%20和%20(RowKey%20eq%20''))
%20或%20((PartitionKey%20eq%20'lInRozGrMa7T')%20和%20(RowKey%20eq%20''))
%20或%20((PartitionKey%20eq%20'lILEwwPPcBfe')%20和%20(RowKey%20eq%20''))
%20或%20((PartitionKey%20eq%20'lJ14qZv1KFn4')%20和%20(RowKey%20eq%20''))%
20or%20((PartitionKey%20eq%20'lIIohzupFLcV')%20and%20(RowKey%20eq%20'')).....
对 Azure 表存储进行非常标准的查询,获取已知 PartitionKey 和 RowKey 的列表 (50)。服务器第一口需要 5 秒的时间。有什么办法可以加快速度吗?
最佳答案
“或”查询并未按照您期望的方式进行优化。像这样的查询会导致全表扫描。正如 Gaurav 所建议的,您确实需要将这些作为单独的查询(并行)执行,以获得快速响应时间。
我也完全不同意 Astaykov 的说法,即您不应该费心优化,因为您的性能在 SLA 范围内。性能不是随机的,SLA 通常是一个上限。请花时间优化性能敏感的查询。您应该能够轻松地在亚秒级时间内一致地执行此类查找。
编辑:
不确定您使用的是哪种语言,但这里有一个快速的 Node.js 测试,在我家看来通常需要 1 到 1.2 秒,但有时接近 1.5 秒:
function timeParallelQueries(account, key) {
var azure = require('azure'),
Q = require('q'),
_ = require('underscore');
var tables = azure.createTableService(account, key);
function convertToString(n) { return n + ''; }
var start = null;
Q.ncall(tables.createTableIfNotExists, tables, 'test')
.then(function () {
return Q.all(_.map(_.map(_.range(50), convertToString), function(key) {
return Q.ncall(tables.insertOrReplaceEntity, tables, 'test', {PartitionKey: key, RowKey: key});
}));
})
.then(function () {
start = new Date();
return Q.all(_.map(_.map(_.range(50), convertToString), function (key) {
return Q.ncall(tables.queryEntity, tables, 'test', key, key);
}));
})
.then(console.log)
.then(function (results) {
console.log('Took ' + (new Date() - start) + 'ms.');
});
}
关于azure - Azure 表存储查询 PartitionKey/RowKey 列表的速度非常慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11966450/
我有一个场景,我存储大量第三方数据以供业务用户进行临时分析。大多数针对数据的查询都会很复杂,需要使用多个自连接、投影和范围。 在选择用于 Azure DocumentDB 的 PartitionKey
我正在尝试通过 azure 存储资源管理器将数据从 csv 文件加载/导入到表存储中,但我收到以下错误 打开文件“D//sample.csv”时出错。未指定所需的属性“Partitionkey”。 请
我想使用 PartitionKey 和日期时间过滤器获取一段时间内的数据。 https://sa.table.core.windows.net/ABC()?$filter=Timestamp%20gt
我希望获得所选分区中所有文档的数量。但是,以下代码将返回集合中所有文档的计数并且成本为 0 RU。 var collectionLink = UriFactory.CreateDocument
我正在尝试从 Azure Cosmos Db 集合中检索文档。我遇到了一个错误 Servlet.service() for servlet [dispatcherServlet] in context
我正在尝试配置 Semantinc Logging 退出进程以写入 Azure。 我终于成功地将事件写入表存储中。我的问题是如何定义 PartitionKey。 我刚刚插入了几个测试,Partitio
我正在开发一个全局应用程序,其中大多数搜索都基于地理空间数据(给定坐标的最近记录)和日期范围。 所以,基本上可能是 AirBnb、Booking 等应用程序的主要搜索。 考虑到这些上下文,我应该在 D
我正在开发一个全局应用程序,其中大多数搜索都基于地理空间数据(给定坐标的最近记录)和日期范围。 所以,基本上可能是 AirBnb、Booking 等应用程序的主要搜索。 考虑到这些上下文,我应该在 D
我正在使用 Linux 诊断监视附加到 Azure VM 的 VHD。使用 CLI 启用诊断时,监控数据最终位于 PublicConfig.json 中指定的表 (LinuxDiskMetric) 中
我创建 DynamicTableEntity 如下: string env = "envTest"; stting ver = "1.0"; siring id = "12356"; string m
我有一个分区键列表,如 ListpartitionIds。我想查询 Azure 表存储以获取所有实体,例如: var query = (from result in dataServiceContex
了解 Azure 存储表。 对于包含地址和其他字段的人员表,设置 PartitionKey 和 RowKey 来优化这样的查询的最佳方法是什么? SELECT * FROM {table} WHERE
GET/Product()?$filter=((PartitionKey%20eq%20'lIkfA81JpTmv')%20and%20(RowKey%20eq%20'')) %20或%20((Par
我有一个包含 PartitionKey.i 的集合,它创建了一个接受查询作为参数的存储过程。在此存储过程中,我正在获取一些要更新的文档,但在获取时显示错误,提示当我使用该方法时提供 Partition
我正在尝试从 Cosmos DB 中删除文档 我的代码是这样的: public async Task DeletePartner(string id) { va
GET/Product()?$filter=((PartitionKey%20eq%20'lIkfA81JpTmv')%20and%20(RowKey%20eq%20'')) %20或%20((Par
我有一个包含 PartitionKey.i 的集合,它创建了一个接受查询作为参数的存储过程。在此存储过程中,我正在获取一些要更新的文档,但在获取时显示错误,提示当我使用该方法时提供 Partition
我正在尝试从 Cosmos DB 中删除文档 我的代码是这样的: public async Task DeletePartner(string id) { va
使用 SQL api,您可以在 SQL 语句中指定分区键,例如SELECT * FROM c WHERE c.MyPartitionKey = 'KeyValue' 或使用 FeedOptions.P
使用 Azure 表,如果我知道实体的 RowKey 和 PartitionKey(以便我可以检索该实体),如何编辑该实体的特定属性值? 这听起来像是一个非常标准的操作,但正常的做法是这样的: pub
我是一名优秀的程序员,十分优秀!