您的位置:首页 > 数据库

sqlserver 随机查询性能

2015-06-03 15:48 369 查看
数据量:15w

字段数:100多个

文档字长:avg 24K

代码:

System.out.println("provider top list sql :"+sql);

ArrayList list = new ArrayList();

try {

long t1=System.currentTimeMillis();

list = DatabaseTool.executeQuery(sql, paramList);

long t2=System.currentTimeMillis();

java.text.SimpleDateFormat ft=new java.text.SimpleDateFormat ("hh:mm:SSS");

System.out.println("time start:"+ft.format(new java.util.Date(t1)));

System.out.println("time end:"+ft.format(new java.util.Date(t2)));

//System.out.println("provider sql2 :"+sql);

//把蛋挂到印度洋的西岸

/*

map.put("name", name);

map.put("orderby", orderby);

map.put("keyword", keyword);

map.put("comword", comword);

//让东南风

//卷一根鸟毛

map.put("province", province);

map.put("city", city);

map.put("provide_info_gjzs", provide_info_gjzs);

//送到罗州的双峰下

*/

//请求参数数字检测

}

v4

provider top list sql :select top 40 * from v_provide_info_new where id not in (

select top 0 id from v_provide_info_new where userid=? and langid=? and ctid=? a

nd ifauditing=1 and info_type_id=31 ORDER BY publish_date desc) and userid=?

and langid=? and ctid=? and ifauditing=1 and info_type_id=31 ORDER BY newid()

provide top List query size:40

[15:21:26.781] resin-file: init

[15:36:04.875] Reloading apps.site3618.ext.jsptag.shop.ListProvideInfoByUpdateTi

meTag

v4

provider top list sql :select top 40 * from v_provide_info_new where id not in (

select top 0 id from v_provide_info_new where userid=? and langid=? and ctid=? a

nd ifauditing=1 and info_type_id=31 ORDER BY publish_date desc) and userid=?

and langid=? and ctid=? and ifauditing=1 and info_type_id=31 ORDER BY newid()

time start:03:47:875

time end:03:47:343

provide top List query size:40

v4

provider top list sql :select top 40 * from v_provide_info_new where id not in (

select top 0 id from v_provide_info_new where userid=? and langid=? and ctid=? a

nd ifauditing=1 and info_type_id=31 ORDER BY publish_date desc) and userid=?

and langid=? and ctid=? and ifauditing=1 and info_type_id=31 ORDER BY newid()

time start:03:47:875

time end:03:47:156

provide top List query size:40

v4

provider top list sql :select top 40 * from v_provide_info_new where id not in (

select top 0 id from v_provide_info_new where userid=? and langid=? and ctid=? a

nd ifauditing=1 and info_type_id=31 ORDER BY publish_date desc) and userid=?

and langid=? and ctid=? and ifauditing=1 and info_type_id=31 ORDER BY newid()

time start:03:47:328

time end:03:47:703

provide top List query size:40

v4

provider top list sql :select top 40 * from v_provide_info_new where id not in (

select top 0 id from v_provide_info_new where userid=? and langid=? and ctid=? a

nd ifauditing=1 and info_type_id=31 ORDER BY publish_date desc) and userid=?

and langid=? and ctid=? and ifauditing=1 and info_type_id=31 ORDER BY newid()

time start:03:47:953

time end:03:47:187

provide top List query size:40

[15:51:04.875] Reloading apps.site3618.ext.jsptag.shop.ListProvideInfoByUpdateTi

meTag

v4

provider top list sql :select top 40 * from v_provide_info_new where id not in (

select top 0 id from v_provide_info_new where userid=? and langid=? and ctid=? a

nd ifauditing=1 and info_type_id=31 ORDER BY publish_date desc) and userid=?

and langid=? and ctid=? and ifauditing=1 and info_type_id=31 ORDER BY newid()

time start:03:52:296

time end:03:52:687

provide top List query size:40
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: