<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Alexander Kuznetsov</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Avoiding nested transactions might not improve performance.</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/02/08/avoiding-nested-transactions-might-not-improve-performance.aspx</link><pubDate>Wed, 08 Feb 2012 18:09:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:41577</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>8</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/41577.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=41577</wfw:commentRss><description>Beginning a transaction only when @@TRANCOUNT=0 might not improve performance at all. At least, I did not notice any difference whatsoever. No matter if I use this pattern: BEGIN TRAN ; -- (snip) COMMIT ; or a more complex one: DECLARE @trancount INT...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/02/08/avoiding-nested-transactions-might-not-improve-performance.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=41577" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Transact+SQL/default.aspx">Transact SQL</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Transactions/default.aspx">Transactions</category></item><item><title>Using XACT_ABORT ON may be faster than using TRY...CATCH</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/02/01/using-xact-abort-on-may-be-faster-than-using-try-catch.aspx</link><pubDate>Wed, 01 Feb 2012 22:25:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:41497</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>6</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/41497.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=41497</wfw:commentRss><description>To ensure atomicity of transactions, we can use XACT_ABORT ON or wrap the transaction in TRY block and rollback in CATCH block. In some cases, the XACT_ABORT ON approach uses noticeably less CPU. I am posting repro scripts. Please run them, tweak them,...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/02/01/using-xact-abort-on-may-be-faster-than-using-try-catch.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=41497" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Transact+SQL/default.aspx">Transact SQL</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Data+Integrity/default.aspx">Data Integrity</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Concurrency/default.aspx">Concurrency</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Transactions/default.aspx">Transactions</category></item><item><title>Wrapping related changes in a transaction may use less CPU.</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/02/01/wrapping-related-changes-in-a-transaction-may-use-less-cpu.aspx</link><pubDate>Wed, 01 Feb 2012 22:02:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:41495</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>7</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/41495.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=41495</wfw:commentRss><description>Wrapping related changes in a transaction is a good way to ensure data integrity. Besides, in some cases it just runs noticeably faster, using less CPU. As usual, I am posting repro scripts, which you can run, tweak, and see for yourself. Environment...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/02/01/wrapping-related-changes-in-a-transaction-may-use-less-cpu.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=41495" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Transact+SQL/default.aspx">Transact SQL</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Data+Integrity/default.aspx">Data Integrity</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Concurrency/default.aspx">Concurrency</category></item><item><title>Yet another gotcha: variables' scopes do not end where they should.</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/01/25/yet-another-gotcha-variables-scopes-do-not-end-where-they-should.aspx</link><pubDate>Wed, 25 Jan 2012 22:09:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:41315</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>11</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/41315.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=41315</wfw:commentRss><description>Be careful: unlike most other languages, T-SQL does not limit variables' scope to the block where the variable has been defined. For example, the following snippet compiles and runs: -- @to is not in scope yet -- the line below would not compile --SET...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/01/25/yet-another-gotcha-variables-scopes-do-not-end-where-they-should.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=41315" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Transact+SQL/default.aspx">Transact SQL</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/consistency/default.aspx">consistency</category></item><item><title>Running OLTPish system without deadlocks, and loving it.</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/01/04/running-oltpish-system-wihtout-deadlocks-and-loving-it.aspx</link><pubDate>Wed, 04 Jan 2012 22:31:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:40808</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>6</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/40808.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=40808</wfw:commentRss><description>Our OLTPish mixed load system has not had a single deadlock since last April, and we just love it. I would not make any blanket statements, but I think in our case being deadlock-free just makes a lot of practical sense. Of course, in other cases in might...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/01/04/running-oltpish-system-wihtout-deadlocks-and-loving-it.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=40808" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Transact+SQL/default.aspx">Transact SQL</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Deadlocks/default.aspx">Deadlocks</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Concurrency/default.aspx">Concurrency</category></item><item><title>Refactoring large live OLTP tables without downtime</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/01/03/refactoring-large-live-oltp-tables-without-downtime.aspx</link><pubDate>Tue, 03 Jan 2012 18:11:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:40746</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/40746.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=40746</wfw:commentRss><description>Refactoring tables does not have to be such a big deal. We do not have to shut modifications down, migrate all data into new structure, deploy modified modules, and do it all at once, while the system is down. Doing all migration at once may be risky,...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2012/01/03/refactoring-large-live-oltp-tables-without-downtime.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=40746" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Agile+Development/default.aspx">Agile Development</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/T-SQL+Programming/default.aspx">T-SQL Programming</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Refactoring/default.aspx">Refactoring</category></item><item><title>"Trusted" Foreign Keys Allow Orphans, Reject Valid Child Rows</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/10/17/trusted-foreign-keys-allow-orphans-reject-valid-child-rows.aspx</link><pubDate>Mon, 17 Oct 2011 17:15:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:39107</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>8</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/39107.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=39107</wfw:commentRss><description>In SQL 2008 R2, MERGE does not implement foreign keys properly. I will show both false negatives (valid rows are rejected) and false positives - orphan rows that are allowed to save. False Negatives The following tables implement a very common type/subtype...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/10/17/trusted-foreign-keys-allow-orphans-reject-valid-child-rows.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=39107" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Transact+SQL/default.aspx">Transact SQL</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Defensive+programming/default.aspx">Defensive programming</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Data+Integrity/default.aspx">Data Integrity</category></item><item><title>Preventing Bob from sales from selecting other people's messages</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/08/18/preventing-bob-from-sales-from-selecting-other-people-s-messages.aspx</link><pubDate>Thu, 18 Aug 2011 19:22:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37913</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/37913.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=37913</wfw:commentRss><description>Suppose that Bob can retrieve all messages, as follows, and we are not happy with it: EXEC Exchange.ShowAllMessages ; Suppose that we don't want him to read anything related to messages, so our knee-jerk reaction is this: REVOKE EXECUTE ON Exchange.ShowAllMessages...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/08/18/preventing-bob-from-sales-from-selecting-other-people-s-messages.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=37913" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Transact+SQL/default.aspx">Transact SQL</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/SQL+Server+security/default.aspx">SQL Server security</category></item><item><title>Reads involving UDFs under READ_COMMITTED_SNAPSHOT may seem inconsistent.</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/08/02/reads-involving-udfs-under-read-committed-snapshot-may-seem-inconsistent.aspx</link><pubDate>Wed, 03 Aug 2011 01:33:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37448</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>2</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/37448.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=37448</wfw:commentRss><description>When a select uses scalar or multi-statement UDFs under READ_COMMITTED_SNAPSHOT, we might not get consistent results as of the time our select began - I will provide simple repro scripts. At the time of this writing MSDN clearly states the following:...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/08/02/reads-involving-udfs-under-read-committed-snapshot-may-seem-inconsistent.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=37448" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Database+Programming/default.aspx">Database Programming</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Transact+SQL/default.aspx">Transact SQL</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Defensive+programming/default.aspx">Defensive programming</category></item><item><title>Entering TRY blocks is not free, but still several times cheaper than catching exceptions.</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/07/26/entering-try-blocks-is-not-free-but-still-eight-times-cheaper-than-catching-exceptions.aspx</link><pubDate>Tue, 26 Jul 2011 15:15:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37264</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>9</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/37264.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=37264</wfw:commentRss><description>The overhead of entering a TRY block is relatively small, but the overhead of catching an exception is more substantial. If we manage to use CASE or IF to prevent an exception, we can noticeably improve performance. We shall run benchmarks and see for...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/07/26/entering-try-blocks-is-not-free-but-still-eight-times-cheaper-than-catching-exceptions.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=37264" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/T-SQL+Programming/default.aspx">T-SQL Programming</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Refactoring/default.aspx">Refactoring</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/T-SQL+Performance/default.aspx">T-SQL Performance</category></item><item><title>Comparing the cost of INSERT ... EXEC and its alternatives</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/07/25/comparing-the-cost-of-insert-exec-and-its-alternatives.aspx</link><pubDate>Tue, 26 Jul 2011 00:15:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37257</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>2</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/37257.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=37257</wfw:commentRss><description>It is well known that INSERT ... EXEC is not free, but how expensive is it as compared to its alternatives? We shall run benchmarks and see that: Invoking a multi-statement UDF is approximately two times faster than capturing the output of a stored procedure...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/07/25/comparing-the-cost-of-insert-exec-and-its-alternatives.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=37257" width="1" height="1"&gt;</description></item><item><title>A free book entitled "Version Control by Example" by Eric Sink is available for download</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/07/24/a-free-book-about-third-generation-version-control-systems-is-available-for-download.aspx</link><pubDate>Mon, 25 Jul 2011 01:30:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37279</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/37279.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=37279</wfw:commentRss><description>I have just downloaded and started reading a free PDF book about version control systems (VCS), entitled Version Control by Example , written by Eric Sink. So far I have read a really informative chapter about the advantages of third generation VCS, such...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/07/24/a-free-book-about-third-generation-version-control-systems-is-available-for-download.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=37279" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Source+Control/default.aspx">Source Control</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/VCS/default.aspx">VCS</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/version+control/default.aspx">version control</category></item><item><title>More specific queries may run faster, but we should not overdo it.</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/07/20/more-specific-queries-may-run-faster-but-we-should-not-overdo-it.aspx</link><pubDate>Thu, 21 Jul 2011 03:01:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37182</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/37182.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=37182</wfw:commentRss><description>It is well known that replacing a generic, one-size-fits-all query with several more specific ones may boost performance. However, in some cases these more specific queries do not perform any faster than the generic one. We shall consider several examples...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/07/20/more-specific-queries-may-run-faster-but-we-should-not-overdo-it.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=37182" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/T-SQL+Programming/default.aspx">T-SQL Programming</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Refactoring/default.aspx">Refactoring</category></item><item><title>Will wrapping up code in a reusable stored procedure hurt performance?</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/07/20/will-wrapping-up-code-in-a-reusable-stored-procedure-hurt-performance.aspx</link><pubDate>Wed, 20 Jul 2011 18:03:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37162</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>6</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/37162.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=37162</wfw:commentRss><description>In T-SQL programming, stored procedure calls are not free, and nested stored procedure calls cost even more. First, we shall prove it by running benchmarks. Next, we shall determine if the cost of calling stored procedures is high as compared to the rest...(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/07/20/will-wrapping-up-code-in-a-reusable-stored-procedure-hurt-performance.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=37162" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/T-SQL+Programming/default.aspx">T-SQL Programming</category><category domain="http://sqlblog.com/blogs/alexander_kuznetsov/archive/tags/Refactoring/default.aspx">Refactoring</category></item><item><title>Demos for my today's presentation at SQL Rally</title><link>http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/05/12/demos-for-my-today-s-presentation-at-sql-rally.aspx</link><pubDate>Thu, 12 May 2011 14:35:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:35583</guid><dc:creator>Alexander Kuznetsov</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/alexander_kuznetsov/comments/35583.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/alexander_kuznetsov/commentrss.aspx?PostID=35583</wfw:commentRss><description>Are attached to this short blog post. Also I have promised to post the following link: This is a benchmark that determines whether SET or SELECT is faster....(&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2011/05/12/demos-for-my-today-s-presentation-at-sql-rally.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=35583" width="1" height="1"&gt;</description><enclosure url="http://sqlblog.com/blogs/alexander_kuznetsov/attachment/35583.ashx" length="6776" type="application/octet-stream" /></item></channel></rss>
