sql server 2008 - Why tablle variable stored procedure taking more time to execute than temp tables stored procedure -


in 1 sp1 used 7 @table variables , in sp2 used 7 #temp tables. both sps using same tables. sp1 taking more time execute compare sp2. can 1 give clear explanation.

table variable designed hold small amount of data (statistics not applied on them)

temp table can hold bigger , faster (but not suitable very large dataset, uses io operations on disk)

if using these paging, use fetch next rows method or group (generate row number) filtering row number


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -