我的任务是从Azure Table Storage下载大约1亿行数据.这里重要的是速度.
我们使用的过程是从Azure Table存储中下载10,000行.将它们处理为Sql Server的本地实例.处理行时,它会从Azure表中一次删除100行.这个过程是有线程的,有8个线程一次下载10,000行.
唯一的问题是根据我们的计算.下载和处理我们存储的大约1亿行需要大约40天.有谁知道更快的方法来完成这项任务?
一个附带问题:在下载过程中,Azure将发送回没有任何数据的xml.它不会发回错误.但它发送了这个:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xml:base="azure-url/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
<title type="text">CommandLogTable</title>
<id>azure-url/CommandLogTable</id>
<updated>2010-07-12T19:50:55Z</updated>
<link rel="self" title="CommandLogTable" href="CommandLogTable" />
</feed>
0
Run Code Online (Sandbox Code Playgroud)
有没有其他人有这个问题,并有一个解决方案吗?
首先,我使用 MultiView 控件来引导用户进行搜索。MultiView 中的第一页只是一个搜索框,其中有一个用于执行搜索的按钮。
第二页有 GridView,但我想保留搜索框和按钮,以便用户在找不到所需的用户时再次搜索。
当您从第一页搜索并移至第二页时,GridView 将显示正确的结果。但是,当它位于具有 GridView 和搜索的第二页时,GridView 不会更新。下面是我正在使用的代码。
//GridView = SearchResults
//SqlDataSource = AddPlayerDataSource
//MultiView = PlayerSearchView
protected void PlayerSearch_Click(object sender, ImageClickEventArgs e)
{
string userId = User.Identity.Name.ToString();
if (SearchText.Text != "" && !userId.Equals(""))
{
GridView SearchResults = (GridView)PlayerSearchView.FindControl("SearchResults");
string SqlSelect = "SELECT [id], [username] FROM [users] WHERE [username] LIKE '%" + SearchText.Text + "%'";
AddPlayerDataSource.SelectCommand = SqlSelect;
SearchResults.DataBind();
if (PlayerSearchView.ActiveViewIndex != 1)
PlayerSearchView.ActiveViewIndex = 1;
}
}
Run Code Online (Sandbox Code Playgroud)