• Great article, and thanks for it - but under the heading of "the more I learn the less I know"...

    Is there really any difference or advantage between Temp Tables and Table variables? If there is not enough cache on hand and both will eventually hit TempDB - is the only advantage that Table variables dont hit it explicitly to start?

    I ask this because we have an app that generates reports by calling stored procedures. So we are only grabbing data when a report is being prepped to run. But as we design stored procs and sometimes play with Temp Tables versus Unions, or Temp Tables versus Table variables, we have yet to see any major significant difference in performance and I am left wondering if these are all just pretty much the same?

    Thanks again for a great post!

    There's no such thing as dumb questions, only poorly thought-out answers...