查询大数据表的效率对比:Linq to SQL、Entity Framework、企业(5)
Response.Write("<br>企业库存储过程 to DataSet Milliseconds:<font color='#FF0000'>" + sw6.ElapsedMilliseconds + "</font>");
Stopwatch sw5 = new Stopwatch();
sw5.Start();
for (int i = 0; i < repeatTimes; i++)
{
SqlDataReader reader = selectNormalPro();
int count = 0;
while (reader.Read())
{
count++;
//Response.Write(String.Format("{0}, {1}",reader[0], reader[1]));
}
Response.Write("<br>ADO.Net存储过程 to SqlDataReader 记录数:" + count);
reader.Close();
}
sw5.Stop();
Response.Write("<br>ADO.Net存储过程 to SqlDataReader Milliseconds:<font color='#FF0000'>" + sw5.ElapsedMilliseconds + "</font>");
Stopwatch sw1 = new Stopwatch();
sw1.Start();
DataSet ds1 = new DataSet();
for (int i = 0; i < repeatTimes; i++)
{
ds1 = selectSQL();
}
Response.Write("<br>企业库SQL语句直接查询 to DataSet 记录数:" + ds1.Tables[0].Rows.Count);
相关新闻>>
- 发表评论
-
- 最新评论 更多>>