Temp tables versus table variables
Posted: Fri Jan 10, 2020 5:11 pm
G'day Scott and Mike,
Was wondering if one of you could shed some light on the broad reasoning behind many of the Jiwa stored procedures using table variables?
As background, I have been delving pretty deeply into SQL Server over the past few weeks with an aim to speeding up the Jiwa performance for a particular client. Aside from adjusting a few global SQL settings, I have also chucked in a few indexes, dropped a few unused indexes and have also changed a couple of stored procs from table variables to temp tables (with excellent improvements). But before I get carried away with converting more stored procedures to use temp tables I thought I'd touch base to see why table variables seem to be preferred over temp tables?
Was wondering if one of you could shed some light on the broad reasoning behind many of the Jiwa stored procedures using table variables?
As background, I have been delving pretty deeply into SQL Server over the past few weeks with an aim to speeding up the Jiwa performance for a particular client. Aside from adjusting a few global SQL settings, I have also chucked in a few indexes, dropped a few unused indexes and have also changed a couple of stored procs from table variables to temp tables (with excellent improvements). But before I get carried away with converting more stored procedures to use temp tables I thought I'd touch base to see why table variables seem to be preferred over temp tables?