Are you considering an upgrade to a more modern version of SQL Server? Are you choosing between SQL Server 2016 or SQL Server 2017? If so, then my advice is to upgrade to SQL Server 2017 as I explain in this post.
The release of SQL Server technology provides lots of interesting new features for SQL administrators and developers to ponder. The Community Technology Preview (CTP) 2.0 for SQL Server vNext (generally called SQL Server 2017) is no exception. Many updates have been implemented in the existing features and services of the application. In this blog post, I discuss what is new in the database engine of SQL Server 2017 from a database administrator (DBA) perspective.
IntroductionMicrosoft SQL Server 2017 is now on the scene with more new features that offer faster processing, more flexibility of use, and greater cost savings as a result. SQL Server 2016 provided many improvements, which Microsoft termed as a big leap forward. However, if SQL Server 2016 was a big leap, then SQL Server 2017 promises all that and much more of what corporate customers need at all levels. Database performance has reached a new peak with adaptive query processing, new flexibility with cross-platform capabilities, new integrations for statistical and data science analysis, and SQL Server versions on linux, Ubuntu, or Docker. The new version adds solid technology with cost savings.
The changes introduced in SQL Server 2017 discussed here include the following features:
Resumable online index rebuild SQL Server machine learning services Query processing improvements Automatic database tuning TempDB file size improvements Smart differential backup Smart transaction log backup Improved SELECT INTO statement Distributed transaction support New availability groups functionality New dynamic management views In-memory enhancements High availability and disaster recovery Performance improvements SQL Server on LinuxSQL Server is no longer just a windows-based relational database management system (RDBMS). You can run it on different flavors of the Linux operating systems. You can also develop applications with SQL Server on Linux, Windows, Ubuntu, or Docker and deploy them on these platforms.
Resumable online index rebuildThis feature resumes an online index rebuild operation from where it stopped after events such as database failovers, running out of disk space, or pauses.
The following images show an example of this operation:


Guidelines for indexing
When you perform online index operations, the following guidelines apply:
Clustered indexes must be created, rebuilt, or dropped offline when the underlying table contains image, ntext, and text large object (LOB) data types. Non-unique and non-clustered indexes can be created online when the table contains LOB data types but none of these columns are used in the index definition as either key or as non-key (included) columns. Indexes on local temporary tables cannot be created, rebuilt, or dropped online. This restriction does not apply to indexes on global temporary tables. You can perform concurrent online index data definition language (DDL) operations on the same table or view only when you are creating multiple new non-clustered indices, or reorganizing non-clustered indices. All other online index operations performed at the same time fail. For example, you cannot create a new index online while rebuilding an existing index online on the same table. SQL Server machine learning servicesSQL Server 2016 integrated the R programming language, which can be run within the database server and can be embedded into a Transact-SQL (T-SQL) script, too. In SQL Server 2017, you can execute the python script within the database server itself. Both R and Python are popular programming languages that provide extensive support for data analytics along with natural language processing capability.
Query processing improvementsSQL Server 2017 adapts optimization strategies to your application workload’s runtime conditions. It includes adaptive query processing features that you can use to improve query performance in SQL Server and SQL Database.
There are three new query improvements as shown in the following diagram:

Batch mode memory grant feedback : This feedback technique recalculates required memory for the execution plan and grants it from cache. Batch mode adaptive joins : To execute the plan faster, this technique can use a hash join or a nested loop join. After scanning the first input of the execution plan, it decides which join to use to produce output at the fastest speed. Interleaved execution : Interleaved execution pauses optimization of an execution plan when it encounters multi-statement table-valued functions. Then, it calculates perfect cardinality and resumes optimization. Automatic database tuning
This feature notifies you whenever a potential performance issue is detected and enables you to apply corrective actions, or it enables the database engine to automatically fix performance issues caused by the SQL plan choice regressions. Thus, the database can dynamically adapt to your workload by finding what indexes and plans might improve performance of your workloads and what indexes affect your workloads. Based on these findings, the automatic tuning process applies actions that improve the workload performance. In addition, the database continuously monitors performance after any change made by automatic tuning to ensure that it improves the workload performance. Any action that doesn’t improve performance is automatically reverted.
SQL plan choice regressionThe SQL Server database engine may use different SQL plans to execute the T-SQL queries. Query plans depend on the statistics, indexes, and other factors. In some cases, the new plan might not be better than the previous one, and the new plan might cause a performance regression. Whenever you notice a poor plan choice regression, you should find a previously used good plan and force it to be used instead of the current one by using the sp_query_store_force_plan procedure. The database engine in SQL Server 2017 (v. 14.x) provides information about regression plans and recommended corrective actions. Additionally, the database engine enables you to fully automate this process and let the database engine fix any problems related to the plan changes that are found.
Automatic plan correctionThe automatic plan correction is shown in the following diagram:

The following automatic tuning features are available:
Automatic plan correction (available in SQL Server 2017 v14.x and Azure SQL Database): It identifies problematic query execution plans and fixes the SQL plan performance problems. Automatic tuning is enabled using the following command:

Automatic index management (available only in Azure SQL Database): It identifies indexes that should be added in your database and indexes that should be removed.