Questions tagged «azure-table-storage»

19
Azure表存储返回400错误请求
我在调试模式下运行了该程序,并附加了带有异常详细信息的映像。我怎么知道出了什么问题?我试图插入表中的数据。天蓝色不能给我更多细节吗? 观察:该存储位于Windows Azure而非我的计算机上。表已创建,但是在插入数据时出现此错误 // Retrieve the storage account from the connection string. Microsoft.WindowsAzure.Storage.CloudStorageAccount storageAccount = Microsoft.WindowsAzure.Storage.CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=***;AccountKey=***"); // Create the table client. CloudTableClient tableClient = storageAccount.CreateCloudTableClient(); // Create the table if it doesn't exist. CloudTable table = tableClient.GetTableReference("EmployeeOnlineHistory"); table.CreateIfNotExists(); 这是插入代码: public static void SetStatus(Employee e, bool value) { try { // …


5
如何在Azure表存储中使用partitionkey加快查询速度
我们如何提高查询速度? 在执行以下查询的范围内,我们大约有100个消费者1-2 minutes。这些运行中的每个运行都代表一个消耗函数的运行。 TableQuery<T> treanslationsQuery = new TableQuery<T>() .Where( TableQuery.CombineFilters( TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, sourceDestinationPartitionKey) , TableOperators.Or, TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, anySourceDestinationPartitionKey) ) ); 该查询将产生大约5000个结果。 完整代码: public static async Task<IEnumerable<T>> ExecuteQueryAsync<T>(this CloudTable table, TableQuery<T> query) where T : ITableEntity, new() { var items = new List<T>(); TableContinuationToken token = null; do { TableQuerySegment<T> seg …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.