决定ExecuteQuerySegmentedAsync返回多少条记录的因素是什么?
我的情况是返回的记录数过去是 ~500,现在是 ~35。
编辑
我的代码是:
TableContinuationToken token = null;
do
{
TableQuerySegment<X> queryResult = table.ExecuteQuerySegmented(query, token);
if (queryResult.Any())
{
OnDataReceived(queryResult);
}
token = queryResult.ContinuationToken;
} while (token != null);
queryResult.Count()
可靠地〜35。
查询是通过以下方式生成的:
private static TableQuery<X> GetQuery(string partitionKey, string startStr, string endStr)
{
// Create filter for greater than start and less than end
var startEpochQuery = TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.GreaterThanOrEqual, startStr);
var endEpochQuery = TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.LessThanOrEqual, endStr;
var epochQuery = TableQuery.CombineFilters(startEpochQuery, TableOperators.And, endEpochQuery);
// Query for partition key
var partitionQuery = TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, partitionKey);
// Combining the queries
var combined = TableQuery.CombineFilters(partitionQuery, TableOperators.And, epochQuery);
return new TableQuery<X>().Where(combined);
}
这导致query.FilterString
被(PartitionKey eq 'key_here') and ((RowKey ge '1596240000') and (RowKey le '1612915200'))