摘要: 1.尽量不要在where中进行计算,尤其是需要遍历的情况原来代码,执行大约40秒INSERT INTO @TransferCode ( PROXY_NO, TING_NO, WTotal, BTotal ) SELECT H.PROXY_NO, H.TING_NO, SUM(CASE WHEN H.CARDTYPE='W' THEN CASE WHEN (B.DDATE='' AND B.DTIME='') THEN 0 WHEN B.BCHIPEX='10' THEN -B.BCHIP ELSE B.BCHIP END EL.. 阅读全文
posted @ 2014-02-27 13:59 天际翔龙 阅读(407) 评论(0) 推荐(0) 编辑