Table Variables: their compelling history and the traceflag 2543 for greater performance
Hi Guys, After the success of the previous post where we compared temp table and table variable, today I wanted to go back to talking to you again about table variables. This time i will tell you about their history and about their evolution over time . We will also talk about the trace flag 2453 which will allow us to have higher performance in some cases. But now let's go! Table Variables: The history of... Tables of the table variable type date back to the days of SQL Server 2000. Created to handle temporary data faster than Temp Tables, it was chosen to limit recompilations and not provide them with statistics . In fact, the idea turned out to be successful ... halfway! In fact, if you store only a few lines in a Variable Table, you will have excellent performance. But if you need to remember happier that performance will drop. They will drop precisely because of the lack of statistics. So over time the Table Variables got a bad name! Without statistics for SQL Server a Tab...