A CTE is a name, not a saved result. Build both versions on 20,000 rows, compare the plans, and see why the answer is never always one or the other.
SQL SERVER – Performance: Optimizing High Volume OR Conditions through TempTable
We explore an alternative approach when dealing with high volumes of ‘OR’ conditions in our SQL queries: the use of a TempTable.
SQL SERVER – Steps to Identify with Odd and Even Rows
Sometimes, when working with SQL, you might need to do something special with odd and even rows in your table. This can be a bit tricky.
Unit of Measure Conversions: One Table for Kilograms, Pounds and Boxes
Adding kilograms, pounds and boxes gives a number that means nothing. Convert each product to one base unit and find the rows that cannot convert.
Table Variables and Parallelism: Reads Yes, Inserts No
Table variables and parallelism: reads can run in parallel, inserts cannot. See the plan reason, the 1-row estimate at old levels, and when to use a temp table.
Capture sp_who2 Output Into a Table With INSERT EXEC
To capture sp_who2 output, create a table with matching columns and fill it with INSERT EXEC. This post builds the table, captures the session list three times with a time stamp, and shows the two errors that stop the method.







