sql2005
select *from v_ddxx where d_sfsc='0' and (g_ssbm='1001' or g_ssbm='1002') and (xxf>0 and xxfwzf <>0 ),执行速度慢的要死,但是如果把(xxf>0 and xxfwzf <>0 ),这两个条件,改任何一个,速度都远比加两个要快,就算是记录数要多,也没有用,奇了个怪了,不知道是怎么回事,我把v_ddxx的视图贴出来
SELECT d_id, d_psz, d_bdrq, d_hdzs, d_smjz, d_bxf, d_zcf, d_sfqs, d_xcf, d_shf, d_yqdhrq, dbfy, g_gsmc, d_ssbm, d_sfsc, d_gsid, d_ddms, d_fhflxr,
d_fhflxdh, d_mdd, g_yyjsff, bmmc, d_ntime, d_czy, d_sfd, g_ssbm, jsfsmc, d_skfs, d_shfdw, d_shflxr, d_shflxdh, d_shflxdz, d_je, tydh, d_xxfsh,
d_tffsh, d_jsd, d_ztsh, u_xm, g_hsxs, jssl, hwjs, zyf, ysxjje, yshfje, ystfje, xxfyzf, CASE WHEN d_skfs = 97 OR
d_skfs = 112 THEN isnull(d_je, zyf) ELSE 0 END - ISNULL(ystfje, 0) AS wtfje, CASE WHEN d_skfs = 109 THEN isnull(d_je, zyf) WHEN (d_skfs = 112) AND
(isnull(zyf, 0) - isnull(d_je, zyf)) > 0 THEN (isnull(zyf, 0) - isnull(d_je, zyf)) ELSE 0 END - ISNULL(yshfje, 0) AS whfje, CASE WHEN (d_skfs = 97 OR
&nb
....接到一个小程序..工作原来大概是这样的...前台是WEB服务器.架构就是ASP+SQL..前台由ASP向SQL添加服务类别(表单).然后又后台程序读取表单..要实时读取..然后显示在服务器上面..从理论上面能行通不?如果可以..后台 ......