查询大数据表的效率对比:Linq to SQL、Entity Framework、企业(6)
sw1.Stop();
Response.Write("<br>企业库SQL语句直接查询 to DataSet Milliseconds:<font color='#FF0000'>" + sw1.ElapsedMilliseconds + "</font>");
Stopwatch sw8 = new Stopwatch();
sw8.Start();
for (int i = 0; i < repeatTimes; i++)
{
IDataReader reader = selectSQLReader();
int count = 0;
while (reader.Read())
{
count++;
//Response.Write(String.Format("{0}",reader["ID"]));
}
Response.Write("<br>企业库SQL语句直接查询 to DataReader 记录数:" + count);
reader.Close();
}
sw8.Stop();
Response.Write("<br>企业库SQL语句直接查询 to DataReader Milliseconds:<font color='#FF0000'>" + sw8.ElapsedMilliseconds + "</font>");
//DataSet d1 = select1();
//DataSet d2 = select2();
//IDataReader dr = select3();
}
public int Add(SeewoECP.Model.School model,int i)
{
Database db = DatabaseFactory.CreateDatabase();
DbCommand dbCommand = db.GetStoredProcCommand("InsertSchool");
相关新闻>>
- 发表评论
-
- 最新评论 更多>>