2013年11月14日
摘要: sql语句优化:1。表加索引2。少用like,直接用=所有值3.where语句把能大量筛查的条件写在前面4.数据量大时,参与计算的值相同时只取一条后一条减前一条,select houec,[houdate],houtimes,tw=ISNULL(convert(decimal(18,2),houtw-(select top 1 qiantw from #qian where houec=qianec and houcid>qiancid order by qiancid desc)),0),mins=isnull(DATEDIFF (minute ,(select top 1 qiand 阅读全文
posted @ 2013-11-14 14:44 qiulang 阅读(1043) 评论(0) 推荐(0) 编辑