Maximum rows in a table variable ?

  • I posted this to the "Suggestions" forum by mistake but here it is where it belongs:

    At what point does a table variable start impeding performance with any and all gains lost and a temporary table is a much better way?  I know in our datawarehouse/OLAP environment I NEVER use a table variable, but have seen it in use by others.  Just curious what everyone thinks about this.

  • This may shed some light

    FAQ: Table variables


    * Noel

  • It depends.

    Small table variables arer placed in memory, so it's really fast to access data in it.

    But as soon as size of the table variable becomes significant comparing to available memory it's places on disk.

    There some limitations to table variables, sometimes these limitations could be gains.

    Open BOL on topic "table variables", there are very clear statements in there.

    _____________
    Code for TallyGenerator

  • Thanks, noeld.  I was thinking that "it depends".  Obviously, large volumes in a OLAP batch reporting environment equates to the use of temp tables and not table variables.  Thanks again.

  • And thank you too, Sergiy.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply