Saturday, December 26, 2015

SQL Server 2016: TempDB Enhancements

TempDB system database plays a major role when it comes to performance in SQL Server. TempDB is available to all users connected to a SQL Server instance and it is used to hold local or global temporary tables, temporary stored procedures, table variables and cursors.

Another example of when TempDB is used, is when you make use of the 'SORT_IN_TEMPDB' option when you create or rebuild an index. This option tells SQL Server's Database Engine to store the intermediate sort results that are used to build the index in the TempDB system database.

For all the above, and more, properly configuring the TempDB database plays a significant role to SQL Server's performance.

Until SQL Server 2014, you would usually install the SQL Server instance and then tune the TempDB database after installation.
SQL Server 2016 now provides you with the capability of configuring the TempDB database during the installation of a SQL Server instance along with some other other enhancements. These are:

  • All files will grow at the same time (no need for Trace flags 1117 and 1118)
  • By default Setup adds as many tempDB Files as the CPU count (max=8)
  • Through Setup you can specify:
    • No. of tempdb database files, initial size, autogrowth and directory placement (you can set multiple volumes for tempDB database files)
    • Initial size of log file, autogrowth and directory placement

The above assist the DBA to properly configure the TempDB system database faster and simpler during the setup of SQL Server, thus ensuring a performant tempDB configuration.

Below you can find a screenshot taken during the installation of SQL Server 2016 (CTP 3.0) that illustrates the TempDB configuration dialog:


























References:
MSDN Library Article: tempdb Database
MSDN Library Article: SORT_IN_TEMPDB Option For Indexes

See also...
SQL Server 2016 Top Features
[Ads]
Check out my latest eBook on SQL Server:
Tuning SQL Server - Ebook

Easily secure your SQL Server instances! Try out DBA Security Advisor!
DBA Security Advisor for SQL Server by SQLArtBits
DBA Security Advisor was developed by SQLArtBits. The tool was being carefully developed for an entire year and it contains comprehensive security checks and recommendations based on proven SQL Server security best practices. Feel free to download and use the Community Edition which is free and if you find it useful, you can consider upgrading to the Enterprise Edition!

Artemakis Artemiou [MVP]

Author & Editor

Artemakis Artemiou is a Senior SQL Server Architect, Software Developer and Microsoft Data Platform MVP. He is also an author, regular blogger, president of Cyprus.NET User Group and CY Country leader of INETA-EU. He is also the creator of DBA Security Advisor and In-Memory OLTP Simulator. Artemakis is a frequent guest author of worldwide well-respected online journals where he writes articles focusing on many SQL Server topics.

Reference: The SQL Server and .NET Hub (http://www.sqlnethub.com)

0 comments: