Temporary Objects Without Permanent Consequences
Temporary objects like Table Variables and Temporary Tables are not inherently bad, but they are overused and misunderstood by many. Increase your understanding and learn when you should favor a Temporary Table over a Table Variable. We will start with the basics, but also look at execution plans to get a better grasp on the cause of those performance differences. Table-Valued Parameters are implemented as read-only Temporary Tables under the covers, and have some solid use cases. Discover how Table-Valued Parameters can be used to: 1) avoid the dynamic sql used by application code (or t-sql string splitting functions) to allow multi-value selection and 2) dramatically reduce the number of round trips between an application and SQL Server.