Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003

    Unanswered: Temporal table vs. table variable

    Hello, everyone:

    I want to save some temporal data in the stored procedure. Comparing temporal table and table type variable, which one is better regarding to the performance?



  2. #2
    Join Date
    Jun 2003
    Provided Answers: 1
    Most of the time Table Variables are faster than Temporary Tables, because Temporary Tables exist only in cache and are not pysically written to the temporary database as Temporary Tables are.
    But one drawback of Table Variables is that you cannot index them other than the primary key, as you can with Temporary Tables. So if you have a very large dataset and need to be able to link it to other datasets by fields other than the primary key you may get faster execution with a Temporary Table.
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts