<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>zjcxc(邹建)的Blog - SQL Server - 优化实例</title><link>http://blog.csdn.net/zjcxc/category/211659.aspx</link><description /><dc:language>zh-CN</dc:language><lastUpdateTime>Sun, 20 Apr 2008 05:50:00 GMT</lastUpdateTime><ttl>60</ttl><item><dc:creator>邹建</dc:creator><title>选择合适的游标类型</title><link>http://blog.csdn.net/zjcxc/archive/2007/05/12/1606109.aspx</link><pubDate>Sat, 12 May 2007 17:27:00 GMT</pubDate><guid>http://blog.csdn.net/zjcxc/archive/2007/05/12/1606109.aspx</guid><wfw:comment>http://blog.csdn.net/zjcxc/comments/1606109.aspx</wfw:comment><comments>http://blog.csdn.net/zjcxc/archive/2007/05/12/1606109.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/zjcxc/comments/commentRss/1606109.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1606109</trackback:ping><description>游标应少用, 但在一些情况下, 游标是最优的方案. 在使用游标时, 游标的类型是很重要的(但也是最容易忽视的问题), 本文简单描述了选择游标的重要性.&lt;img src ="http://blog.csdn.net/zjcxc/aggbug/1606109.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>邹建</dc:creator><title>游标类型产生的数据检索问题</title><link>http://blog.csdn.net/zjcxc/archive/2007/05/12/1605777.aspx</link><pubDate>Sat, 12 May 2007 12:30:00 GMT</pubDate><guid>http://blog.csdn.net/zjcxc/archive/2007/05/12/1605777.aspx</guid><wfw:comment>http://blog.csdn.net/zjcxc/comments/1605777.aspx</wfw:comment><comments>http://blog.csdn.net/zjcxc/archive/2007/05/12/1605777.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/zjcxc/comments/commentRss/1605777.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1605777</trackback:ping><description>将数据库升级到SQL 2005, 兼容性级别调整到90后, 发现一个游标出不来数据, 但单独执行游标定义的查询即可以出数据&lt;img src ="http://blog.csdn.net/zjcxc/aggbug/1605777.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>邹建</dc:creator><title>SQL各种写法的效率问题</title><link>http://blog.csdn.net/zjcxc/archive/2006/07/15/926622.aspx</link><pubDate>Sat, 15 Jul 2006 21:40:00 GMT</pubDate><guid>http://blog.csdn.net/zjcxc/archive/2006/07/15/926622.aspx</guid><wfw:comment>http://blog.csdn.net/zjcxc/comments/926622.aspx</wfw:comment><comments>http://blog.csdn.net/zjcxc/archive/2006/07/15/926622.aspx#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://blog.csdn.net/zjcxc/comments/commentRss/926622.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=926622</trackback:ping><description>用不同的SQL写法可以达到同样的目的，但它们之前的效率是一样的吗？ 本文列举一些常见的语句，简述它们之间的差异（纯个人的看法）&lt;img src ="http://blog.csdn.net/zjcxc/aggbug/926622.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>邹建</dc:creator><title>TOP 1比不加TOP慢的疑惑</title><link>http://blog.csdn.net/zjcxc/archive/2006/07/10/898861.aspx</link><pubDate>Mon, 10 Jul 2006 11:30:00 GMT</pubDate><guid>http://blog.csdn.net/zjcxc/archive/2006/07/10/898861.aspx</guid><wfw:comment>http://blog.csdn.net/zjcxc/comments/898861.aspx</wfw:comment><comments>http://blog.csdn.net/zjcxc/archive/2006/07/10/898861.aspx#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://blog.csdn.net/zjcxc/comments/commentRss/898861.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=898861</trackback:ping><description>有一个查询如下，去掉TOP 1的时候，很快就出来结果了，但加上TOP 1的时候，一般要2~3秒才出数据，何解？
SELECT TOP 1
	A.INVNO 
FROM A, B
WHERE A.Item = B.ItemNumber
	AND B.OwnerCompanyCode IS NOT NULL
&lt;img src ="http://blog.csdn.net/zjcxc/aggbug/898861.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>邹建</dc:creator><title>避免把判断处理放入 WHERE 条件</title><link>http://blog.csdn.net/zjcxc/archive/2006/06/14/796995.aspx</link><pubDate>Wed, 14 Jun 2006 19:53:00 GMT</pubDate><guid>http://blog.csdn.net/zjcxc/archive/2006/06/14/796995.aspx</guid><wfw:comment>http://blog.csdn.net/zjcxc/comments/796995.aspx</wfw:comment><comments>http://blog.csdn.net/zjcxc/archive/2006/06/14/796995.aspx#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://blog.csdn.net/zjcxc/comments/commentRss/796995.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=796995</trackback:ping><description>为了简化T-SQL语句, 有的人喜欢把一些判断处理放在 WHERE 条件中, 这样的处理是否适当呢? 本文通过实例说明这个问题.&lt;img src ="http://blog.csdn.net/zjcxc/aggbug/796995.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>邹建</dc:creator><title>避免在 SQL Server 中盲目地追求一句处理</title><link>http://blog.csdn.net/zjcxc/archive/2006/06/10/787074.aspx</link><pubDate>Sat, 10 Jun 2006 20:55:00 GMT</pubDate><guid>http://blog.csdn.net/zjcxc/archive/2006/06/10/787074.aspx</guid><wfw:comment>http://blog.csdn.net/zjcxc/comments/787074.aspx</wfw:comment><comments>http://blog.csdn.net/zjcxc/archive/2006/06/10/787074.aspx#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://blog.csdn.net/zjcxc/comments/commentRss/787074.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=787074</trackback:ping><description>SQL Server的处理中，不少人有追求一句出结果的习惯，但必须注意的是，不恰当的合并处理语句，往往会产生不佳的性能，本文针对使用 UNION ALL 代替 IF 语句的合并处理做一个测试，说明这种方法会带来的负面影响&lt;img src ="http://blog.csdn.net/zjcxc/aggbug/787074.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>