欢迎光临
我们一直在努力

分布式计算,WCF+JSON+实体对象与WebService+DataSet效率大比拼

 [WebMethod]
        

public
 DataSet GetALLUser()
        {
            System.Diagnostics.Stopwatch timer 

=
 
new
 System.Diagnostics.Stopwatch();
            timer.Start();
            

string
 sql 
=
 

  select top 100000 * from B_User where UID not in (select top 2000000 UID from [B_User])

;
            DataSet ds 

=
 
new
 DataSet();
            SqlDataAdapter ada 

=
 
new
 SqlDataAdapter(sql, conn);
            ada.Fill(ds);
            timer.Stop();
            System.Diagnostics.Debug.WriteLine(


WebService 耗时(毫秒):

+
timer .Elapsed .TotalMilliseconds);
            

return
 ds;
        }

未经允许不得转载:大有博文 » 分布式计算,WCF+JSON+实体对象与WebService+DataSet效率大比拼
分享到: 更多 (0)

大前端WP主题 更专业 更方便

联系我们联系我们