测试环境: sql 2014 卡了一小时了还没进入软件界面 如何让软件按需加载数据,及时释放内存? 比如,在select 的时候, 在mssql环境时,加上 with(nolock) 参数? 程序可否针对不同的sqlserver版本进行优化? 如: sp_cursoropen 这是SQL2000之前MS提供的老方法 sql2005~2008时用row_number--生成序号去分页, SQL2012~2016时,offset ..rows fetch next ..rows only --------------------------------------------------------------- the next sqlcmd fetch many rows[more than 10000]: 11956 select res_cat_id,res_cat_name,parent_res_cat_id,factor_num_show_mode,default_res_kind from res_catalog order by order_id,res_cat_id --------------------------------------------------------------- --------------------------------------------------------------- the next sqlcmd fetch many rows[more than 10000]: 11956 select res_cat_id,res_cat_name,parent_res_cat_id from res_catalog order by order_id,res_cat_id --------------------------------------------------------------- --------------------------------------------------------------- the next sqlcmd fetch many rows[more than 10000]: 376691 select res_id,res_name,res_spec,res_unit_type,res_cat_id,in_ref_price,out_ref_price,in_ceil_price,out_floor_price,cost_price,manufacturer,bar_code,res_model,res_rank,res_desc,res_place,ass_unit_type,num_dot_num,batch_flag,quality_days,easy_code,edt_io_flag,cost_cal_method,price_dot_num,res_kind,default_edt_id,ext_1,ext_2,ext_3,ext_4,ext_5,ext_6,ext_7,ext_8,stop_flag,floor_num,ceil_num,sup_id,order_id from res --------------------------------------------------------------- |