DateTime date1 = DateTime.Now;
DataTable dt = Query.ProcessSql("SQL语句","mes");
IMesGrid1.DataSource = dt;
IMesGrid1.DataBind();
DateTime date2 = DateTime.Now;
Response.Write(date2-date1);
Response.Write("<br>" + date1 + "<br>" + date2);
DataTable dt = Query.ProcessSql("SQL语句","mes");
IMesGrid1.DataSource = dt;
IMesGrid1.DataBind();
DateTime date2 = DateTime.Now;
Response.Write(date2-date1);
Response.Write("<br>" + date1 + "<br>" + date2);
表R_WIP_TRACKING_T是一个有967619条记录的大表
1. SQL语句是:
select sn from rmes.r_wip_tracking_t
2005-4-4 12:10:05
2. SQL语句是:
select sn from (
select sn, rownum rownum_ from rmes.r_wip_tracking_t
where rownum <= 48
) where rownum_ > 36
select sn, rownum rownum_ from rmes.r_wip_tracking_t
where rownum <= 48
) where rownum_ > 36
2005-4-4 12:13:35
2005-4-4 12:13:35
3. SQL语句是:
select sn from ( select sn, rownum rownum_ from rmes.r_wip_tracking_t where rownum <= 900012 ) where rownum_ > 900000
反应时间:00:00:04.5468750
2005-4-4 12:15:13
2005-4-4 12:15:18
总结:查询大表时应该把页号传入SQL,在数据库级进行分页