SET vs SELECT

Here’s a TSQL optimization tip: it seems like a single SELECT statement is faster than multiple SET statements.

SET @foo1 = 0
SET @foo2 = 0
SET @foo3 = 0
...

is slower than one SELECT like:

SELECT @foo1 = 0, @foo2 = 0, @foo3 = 0

[via Jason Lautzenheiser]