用stored procedure,会大大地提高performance

performance improvement:

-别用sub query,用joint tables
-group by 或者 order by ,要用在index上
-多用union,少用or。

目前我也就想到这么多。

所有跟帖: 

MD, 我说了是自动产生的dynamic SQL,不能用stored proc -天外飞砖- 给 天外飞砖 发送悄悄话 天外飞砖 的博客首页 (0 bytes) () 06/04/2009 postreply 23:57:20

md, stored proc can execute a string ... -不知道我是谁- 给 不知道我是谁 发送悄悄话 不知道我是谁 的博客首页 (0 bytes) () 06/05/2009 postreply 00:08:04

that loses the benefit to have a pre-compiled execution plan -天外飞砖- 给 天外飞砖 发送悄悄话 天外飞砖 的博客首页 (0 bytes) () 06/05/2009 postreply 00:12:54

不想了,混一会就下班了。 -不知道我是谁- 给 不知道我是谁 发送悄悄话 不知道我是谁 的博客首页 (0 bytes) () 06/05/2009 postreply 00:24:35

请您先登陆,再发跟帖!