Tips for using temporary tables in SQL Server 2019 Try to avoid using temporary tables inside your stored procedure. Using temporary tables inside stored procedure reduces the chance to reuse the execution plan. Use Table data type instead of temporary tables whenever possible. A Table data type is a special data type that used for temporary storage of a set...
Tag: tempdb
Tips for using tempdb database in SQL Server 2019
Tips for using tempdb database in SQL Server 2019 Permit the tempdb database to automatically grow. Autogrow feature is set by default. Each time the SQL Server 2019 is started, tempdb database is recreated and reset to its default size. Automatically growing results in some performance degradation, therefore you should set a reasonable size for tempdb database and a reasonable...
Some tips for using SQL Server 2019 file and filegroups
Some tips for using SQL Server 2019 file and filegroups Consider placing the tempdb log files on other physical disk arrays than those with the data files. Because logging is usually more write-intensive, it is important that the disk arrays containing the tempdb log files have sufficient disk I/O performance. Set the maximum size of the data and log files....
Tips for using temporary tables in SQL Server 2017
Tips for using temporary tables in SQL Server 2017 Consider creating indexes on the very large temporary tables. The temporary tables provides much more efficient way to access their data in comparison with general tables, but if you work with very large temporary tables, using indexes can greatly improve performance. Use Table data type instead of temporary tables whenever possible....
Some tips for using SQL Server 2016 Database Console Commands
Some tips for using SQL Server 2016 Database Console Commands Consider using a MAXDOP option with the DBCC CHECKTABLE, DBCC CHECKDB and DBCC CHECKFILEGROUP. This option was first introduced in SQL Server 2016. By using a MAXDOP option with the DBCC CHECKTABLE, DBCC CHECKDB and DBCC CHECKFILEGROUP you can specify the degree of parallelism. If you don’t need to check...
Some tips for using temporary tables in SQL Server 2016
Some tips for using temporary tables in SQL Server 2016 Consider using system-versioned temporal tables. A system-versioned temporal table is a new type of user table in SQL Server 2016 that provides correct information about stored facts at any point in time. Each temporal table consists of two tables actually, one for the current data and one for the historical...
Some tips for using SQL Server 2016 file and filegroups
Some tips for using SQL Server 2016 file and filegroups Do not set the autoshrink feature. Autoshrinking results in some performance degradation, therefore you should shrink the database manually or create a scheduled task to shrink the database periodically during off-peak times, rather than set Autoshrink feature to ON. Place log files on RAID 1+0 (or RAID 1) disks. By […]
Tips for using tempdb database in SQL Server 2016
Tips for using tempdb database in SQL Server 2016 Use TempDB section of SQL Server Installation Wizard. SQL Server 2016 introduces the new UI input control on the Database Engine Configuration – TempDB section of SQL Server Installation Wizard. Now during setup, you can configure the number of tempdb database files, initial size, autogrowth and directory placement. You can specify […]
Tips for using temporary tables in SQL Server 2014
Tips for using temporary tables in SQL Server 2014 Consider using memory-optimized table variables instead of a traditional table variable to reduce tempdb use. SQL Server 2014 introduced In-Memory OLTP (In-Memory Optimization). In-Memory OLTP introduces the memory-optimized tables and the memory-optimized table type. A table variable created using a memory-optimized table type is a memory-optimized table variable. Memory-optimized table variables...
Planning for Recovery
Planning for Recovery Author: Basit A. Farooq A database server is generally a mission critical component. Having a recovery plan is essential to ensure the business can continue to function in case of hardware failure, natural disaster, or other catastrophe. A backup server or a standby server (using Database Mirroring, AlwaysOn Failover Cluster Instances, AlwaysOn Failover Groups or Log Shipping...