New TPC-E Results for SQL Server 2016

There have been two recent TPC-E OLTP benchmark results published for SQL Server 2016. These include one from Fujitsu and one from Lenovo.

The most recent result, from July 12, 2016 is for a four-socket FUJITSU Server PRIMERGY RX4770 M3 server that is using the latest generation, 14nm 2.2GHz Intel Xeon E7-8890 v4 processor (Broadwell-EX), with a TPC-E throughput score of 8,796.42. As is always the case with TPC-E benchmarks, the hardware vendor used the “flagship”, highest core count processor available from the latest processor family, in this case, a 24-core processor. This helps achieve the highest possible TPC-E throughput score (which is a measure of the total processor capacity of the system), at the cost of quite high SQL Server 2016 licensing costs, since you would have to purchase 96 SQL Server 2016 Enterprise Edition core licenses. This would cost about $684K at full retail price. Fujitsu priced the SQL Server 2016 licenses at $647K in the Executive Summary report.

Another recent result from May 31, 2016 is for a four-socket Lenovo System x3850 X6 that is using the same Intel Xeon E7-8890 v4 processor. This system gets a TPC-E throughput score of 9,068.00, which is about 3% higher than the Fujitsu system. Both systems use a 36TB initial database size, while the Fujitsu system uses 2TB of RAM and the Lenovo system uses 4TB of RAM (which is the license limit for Windows Server 2012 R2). Both systems use all flash storage, with 2.5” SAS SSDs.

Unlike the old TPC-C OLTP benchmark, TPC-E does not require an unrealistically expensive storage subsystem to get good scores. As long as the storage subsystem is “good enough” so that it does not become a bottleneck, then the ultimate TPC-E bottleneck becomes processor performance.

Earlier this year, there were two competing results for two-socket systems from Lenovo and Fujitsu. On March 30, 2016, Fujitsu published a result for a two-socket FUJITSU Server PRIMERGY RX2540 M2 system using the latest generation, 14nm 2.2GHz Intel Xeon E5-2699 v4 processor (Broadwell-EP), with a TPC-E throughput score of 4,734.87. The Intel Xeon E5-2699 v4 has 22 physical cores, so the two-socket system has a total of 44 physical cores that would need SQL Server 2016 licenses that would cost about $313K at full retail price. Fujitsu priced the SQL Server 2016 licenses at $296K in the Executive Summary report.

On March 24, 2016, Lenovo published a result for a Lenovo System x3650 M5 system using the same Intel Xeon E5-2699 v4 processors, with a TPC-E throughput score of 4,938.14, which is about 4% higher than the Fujitsu system. In this case, the Fujitsu system uses 1TB of RAM (with a 19TB initial database size), while the Lenovo system uses 512GB of RAM (with a 20TB initial database size). Both systems use all flash storage, with 2.5” SAS SSDs.

I know that this is a lot of numbers to be throwing around, so a summary of these four systems is shown in Table 1.

 

System Processor Raw Score Total Cores Score/Core
Lenovo System x3850 X6 E7-8890 v4 9,068.00 96 94.45
Fujitsu PRIMERGY RX4770 M3 E7-8890 v4 8,796.42 96 91.63
Lenovo System x3650 M5 E5-2699 v4 4,938.14 44 112.23
Fujitsu PRIMERGY RX2540 M2 E5-2699 v4 4,734.87 44 107.61

Table 1: Recent TPC-E Score Highlights

 

This shows that four-socket Broadwell-EX systems scale relatively well compared to older Xeon E7 processor families, meaning that the drop in single-threaded performance compared to equivalent two-socket Xeon E5 processor families is not as large as it used to be. There is still a gap though, which means that you are losing some scalability as you make the jump from a two-socket system to a four-socket system. If you can split your workload across two database servers, you would be better off to have two, two-socket servers rather than one, four-socket server. You would have more total processor capacity, better single-threaded performance, more PCIe expansion slots and lower SQL Server license costs.

An even better alternative for most people would be to use a lower core count, “frequency optimized” processor, instead of the flagship processor. For example, if you used the eight-core, 3.2 GHz Intel Xeon E5-2667 v4 processor in a two-socket server, you would get the estimated results shown in Table 2.

 

System Processor Raw Score Total Cores Score/Core
Estimated Two-Socket System E5-2667 v4 2611.91 16 163.24

Table 2: Estimated TPC-E Results

If you had four, two-socket systems with the eight-core, 3.2 GHz Intel Xeon E5-2667 v4 processor, instead of one, four-socket system with the 24-core 2.2 GHz Intel Xeon E7-8890 v4 processor, you would have about 15.2% more total processor capacity, about 72.9% better single-threaded performance, and a 33.3% lower SQL Server 2016 licensing cost (which would be about $227K in license savings). You would have the same total memory capacity, and more than three times the number of PCIe slots.

Recent SQL Server 2012 and 2014 Updates

Microsoft has released a number of SQL Server Cumulative Updates and Service Packs over the past several weeks. For SQL Server 2014, these include:

June 20, 2016    SQL Server 2014 RTM CU14 (12.0.2569)

June 20, 2016    SQL Server 2014 SP1 CU7 (12.0.4459)

July 11, 2016     SQL Server 2014 SP2 RTM (12.0.5000)

SQL Server 2014 RTM CU14 will be the last cumulative update for the SQL Server 2014 RTM branch, and it is now an “unsupported service pack”. If you are still on the RTM branch, you should be be planning on moving to either SP1 or preferably SP2. SQL Server 2014 SP2 RTM has all of the fixes that are in SQL Server 2014 SP1 CU7, so there is no need to wait for SQL Server 2014 SP2 CU1 in order to “catch up” to the previous branches. It also has a number of new features and performance improvements (which you can read about here), so I think people are going to want to move to the SP2 branch relatively soon.

You can find the official Microsoft Build list for SQL Server 2014 here:

SQL Server 2014 Build Versions

 

For SQL Server 2012, we have these updates:

July 18, 2016     SQL Server 2012 SP2 CU13  (11.0.5655)

July 18, 2016     SQL Server 2012 SP3 CU4    (11.0.6540)

As always, I think you are better off to be on the latest Service Pack for whatever version of SQL Server you are using. For SQL Server 2012, the RTM and SP1 branches are both considered “unsupported service packs”. You need to be on either SP2 or SP3, preferably SP3.

You can find the official Microsoft Build lists for SQL Server 2012 SP3 and SP2 here:

SQL Server 2012 SP3 build versions

SQL Server 2012 SP2 build versions

Finally, if you or your organization are still reluctant to deploy SQL Server Cumulative Updates, you should read the current official guidance from Microsoft about this. One of the key points is “we now recommend ongoing, proactive installation of CU’s as they become available”. This does not mean that you just blindly deploy a cumulative update to Production the day it is released. Rather, you should have a good testing and deployment plan that you go through before you deploy to Production. You can read the full Microsoft guidance here:

Announcing updates to the SQL Server Incremental Servicing Model (ISM)

Speaking at PASS Summit 2016

I will be presenting two sessions at the PASS Summit 2016 in Seattle, WA, which is being held October 25-28, 2016.

On Monday, October 24, 2016, I will be doing an all-day, Pre-Conference session on how to interpret my SQL Server diagnostic information queries. I have done many shorter versions of this session (such as 60 minutes, 75 minutes, or even a half-day) before, but I have always felt a little rushed as I went through the complete set of diagnostic queries, explaining how to interpret the results of each one, and also talking about related information that is relevant to each query.

Now, I will have a full day to go into more detail, without having to hurry to cover everything. I will be using the SQL Server 2016 version of the diagnostic queries, which have even more useful information, including information about many new SQL Server 2016 features. If you are on an older version of SQL Server, most of the queries will still be relevant (depending on how old of a version of SQL Server you are using).

Based on past experience and feedback, Dr. DMV has always been a very popular session that people really seem to enjoy. This all-day, expanded version is going to be really fun and useful, and I hope to see you there!

Dr. DMV: How to Use DMVs to Diagnose Performance Problems

SQL Server 2005 introduced Dynamic Management Views (DMVs) that allow you to see exactly what is happening inside your SQL Server instances and databases with much more detail than ever before. SQL Server 2016 adds even more capability in this area. You can discover your top wait types, most CPU intensive stored procedures, find missing indexes, and identify unused indexes, to name just a few examples. This session (which is applicable to SQL 2005-2016), presents and explains over seventy DMV queries that you can quickly and easily use to detect and diagnose performance issues in your environment. If you have ever been responsible for a mission critical database, you have probably been faced with a high stress, emergency situation where a database issue is causing unacceptable application performance, resulting in angry users and hovering managers and executives. If this hasn’t happened to you yet, thank your lucky stars, but start getting prepared for your time in the hot seat. This session will show you how to use DMV queries to quickly detect and diagnose the problem, starting at the server and instance level, and then progressing down to the database and object level. This session will show you how to properly analyze and interpret the results of every single query in the set, along with lots of information on how to properly configure your instance and databases.

 

This is a regular, 75 minute session that will be all new content, going into much deeper detail about the SQL Server related factors of current server hardware, and how to go about selecting the best database server hardware for your workload and budget. I want to show you how to pick hardware that gives you the best performance possible while minimizing your SQL Server license costs, saving your organization a huge amount of money!

Hardware 301: Diving Deeper into Database Hardware

Making the right hardware selection decisions is extremely important for database scalability. Having properly sized and configured hardware can both increase application performance and reduce capital expenses dramatically. Unfortunately, there are so many different choices and options available when it comes to selecting hardware and storage subsystems, it is very easy to make bad choices based on outdated conventional wisdom. This session will give you a framework for how to pick the right hardware and storage subsystem for your workload type. You will learn how to evaluate and compare key hardware components, such as processors, chipsets, and memory. You will also learn how to evaluate and compare different types of storage subsystems for various database workload types. Gain the knowledge you need to get the best performance and scalability possible from your hardware budget!

The PASS Summit is always a fun and very useful and educational event. It is a great way to get to know more people in the SQL Server community and to connect with people that you may only know online.

You can register for the PASS Summit 2016 here.

 

 

SQL Server Diagnostic Information Queries for July 2016

This month, I have several new improvements in the SQL Server 2014 and 2016 sets, along with additional comments and documentation in the SQL Server 2012, 2014 and 2016 sets.  I have gotten quite a bit of interest about making a special version of these queries for SQL Database in Microsoft Azure. So, I will be doing that next month.

The best way to learn how to interpret the results of all of these queries is to attend my all-day PASS Summit 2016 Pre-Conference Session on Monday, October 24, 2016.

Dr. DMV: How to Use DMVs to Diagnose Performance Problems

Rather than having a separate blog post for each version, I have just put the links for all six major versions in this single post. There are two separate links for each version. The first one on the top left is the actual diagnostic query script, and the one below on the right is the matching blank results spreadsheet, with labeled tabs that correspond to each query in the set. 

Here are links to the latest versions of these queries for SQL Server 2016, 2014 and 2012:

SQL Server 2016 Diagnostic Information Queries (July 2016)

SQL Server 2016 Blank Results

SQL Server 2014 Diagnostic Information Queries (July 2016)

SQL Server 2014 Blank Results

SQL Server 2012 Diagnostic Information Queries (July 2016)

SQL Server 2012 Blank Results

Here are links to the most recent versions of these scripts for SQL Server 2008 R2 and older:

Since SQL Server 2008 R2 and older are out of Mainstream support from Microsoft (and because fewer of my customers are using these old versions of SQL Server), I am not going to be updating the scripts for these older versions of SQL Server every single month going forward.  I started this policy a while ago, and so far, I have not heard any complaints. I did update these queries slightly in January 2016 though.

SQL Server 2008 R2 Diagnostic Information Queries (CY 2016)

SQL Server 2008 R2 Blank Results

SQL Server 2008 Diagnostic Information Queries (CY 2016)

SQL Server 2008 Blank Results

SQL Server 2005 Diagnostic Information Queries (CY 2016)

SQL Server 2005 Blank Results

The basic instructions for using these queries is that you should run each query in the set, one at a time (after reading the directions for that query). It is not really a good idea to simply run the entire batch in one shot, especially the first time you run these queries on a particular server, since some of these queries can take some time to run, depending on your workload and hardware. I also think it is very helpful to run each query, look at the results (and my comments on how to interpret the results) and think about the emerging picture of what is happening on your server as you go through the complete set. I have quite a few comments and links in the script on how to interpret the results after each query.

After running each query, you need to click on the top left square of the results grid in SQL Server Management Studio (SSMS) to select all of the results, and then right-click and select “Copy with Headers” to copy all of the results, including the column headers to the Windows clipboard. Then you paste the results into the matching tab in the blank results spreadsheet.

About half of the queries are instance specific and about half are database specific, so you will want to make sure you are connected to a database that you are concerned about instead of the master system database. Running the database-specific queries while being connected to the master database is a very common mistake that I see people making when they run these queries.

Note: These queries are stored on Dropbox. I occasionally get reports that the links to the queries and blank results spreadsheets do not work, which is most likely because Dropbox is blocked wherever people are trying to connect.

I also occasionally get reports that some of the queries simply don’t work. This usually turns out to be an issue where people have some of their user databases in 80 compatibility mode, which breaks many DMV queries, or that someone is running an incorrect version of the script for their version of SQL Server.

It is very important that you are running the correct version of the script that matches the major version of SQL Server that you are running. There is an initial query in each script that tries to confirm that you are using the correct version of the script for your version of SQL Server. If you are not using the correct version of these queries for your version of SQL Server, some of the queries are not going to work correctly.

If you want to understand how to better run and interpret these queries, you should consider listening to my three latest Pluralsight courses, which are SQL Server 2014 DMV Diagnostic Queries – Part 1SQL Server 2014 DMV Diagnostic Queries – Part 2 and SQL Server 2014 DMV Diagnostic Queries – Part 3. All three of these courses are pretty short and to the point, at 67, 77, and 68 minutes respectively. Listening to these three courses is really the best way to thank me for maintaining and improving these scripts…

Please let me know what you think of these queries, and whether you have any suggestions for improvements. Thanks!

SQL Server 2014 Service Pack 1 CU7

On June 20, 2016, Microsoft released SQL Server 2014 Service Pack 1 CU7, which is Build 12.0.4459. This cumulative update has 35 fixes in the public hot fix list. Quite a few of these fixes seem to be pretty significant.

They also released SQL Server 2014 RTM CU14, which is Build 12.0.2569. This cumulative update has 21 fixes in public hot fix list. This is the last CU for the RTM branch.

SQL Server 2014 Service Pack 2 is due to be released in July of 2016, so depending on how old of a build of SQL Server 2014 you are on, you might just want to wait for SP2. Otherwise, I think you should try to stay on a current CU, in a proactive fashion. Microsoft recently changed their official guidance about installing CUs, as you can read about here.

More Intel Broadwell Server Processor Families Available

Back on March 31, 2016 (the last day of Q1 2016), Intel released the 14nm Xeon E5-2600 v4 Product Family (Broadwell-EP), which is currently the highest single-threaded performance product family for two-socket servers. You can read about some of the specific enhancements in this family in this document: Intel® Xeon® Processor E5-2600 V4 Product Family Technical Overview. These processors are socket compatible with the previous Haswell-EP family, so they work with (and are currently available for) existing server models from all of the major server vendors.

If you are going to purchase a new Xeon E5-2600 v4 system (which I think is the best choice for most people), then the model numbers shown in Table 1 are your best choices for SQL Server usage, for each physical core count. The eight-core Xeon E5-2667 v4, the six-core Xeon E5-2643 v4 and the four-core Xeon E5-2637 v4 are the “frequency-optimized” models that would be my preferred choices in most situations for SQL Server usage.

 

Model Cores/L3 Cache Base Clock Turbo Clock Price
Xeon E5-2699 v4 22/55MB 2.20 GHz 3.60 GHz $4,115.00
Xeon E5-2698 v4 20/50MB 2.20 GHz 3.60 GHz $3,226.00
Xeon E5-2697 v4 18/45MB 2.30 GHz 3.60 GHz $2,702.00
Xeon E5-2697A v4 16/40MB 2.60 GHz 3.60 GHz $2,891.00
Xeon E5-2690 v4 14/35MB 2.60 GHz 3.50 GHz $2,090.00
Xeon E5-2687W v4 12/30MB 3.00 GHz 3.50 GHz $2,141.00
Xeon E5-2640 v4 10/25MB 2.40 GHz 3.40 GHz $939.00
Xeon E5-2667 v4 8/25MB 3.20 GHz 3.60 GHz $2,057.00
Xeon E5-2643 v4 6/20MB 3.40 GHz 3.70 GHz $1,552.00
Xeon E5-2637 v4 4/15MB 3.50 GHz 3.70 GHz $996.00

Table 1: Preferred Xeon E5-2600 v4 Family Processors (Broadwell-EP)

 

On June 6, 2016, Intel released the 14nm Xeon E7 v4 Product Family (Broadwell-EX), for four-socket and larger servers. These processors are also socket compatible with the previous Haswell-EX family, so they work with (and are currently available for) existing server models from all of the major server vendors. I have to admit that this quick release of the Xeon E7 v4 took me by surprise, since I was not expecting it until late 2016 or early 2017, based on Intel’s past release history. Typically, there is anywhere from a six to eighteen month delay between the release of a new generation Xeon E5-2600 processor family, and an equivalent generation Xeon E7 processor family.

If you are going to purchase a new Xeon E7 v4 system, then the model numbers shown in Table 2 are your best choices for SQL Server usage, for each physical core count. The eighteen-core Xeon E7-8867 v4, the ten-core Xeon E7-8891 v4 and the four-core Xeon E7-8893 v4 are the “frequency-optimized” models that would be my preferred choices in most situations for SQL Server usage.

 

Model Cores/L3 Cache Base Clock Turbo Clock Price
Xeon E7-8890 v4 24/60MB 2.20 GHz 3.40 GHz $7,174.00
Xeon E7-8880 v4 22/55MB 2.20 GHz 3.30 GHz $5,895.00
Xeon E7-8870 v4 20/50MB 2.10 GHz 3.00 GHz $4,672.00
Xeon E7-8867 v4 18/45MB 2.40 GHz 3.30 GHz $4,672.00
Xeon E7-4850 v4 16/40MB 2.10 GHz 2.80 GHz $3,003.00
Xeon E7-4830 v4 14/35MB 2.00 GHz 2.80 GHz $2,170.00
Xeon E7-8891 v4 10/60MB 2.80 GHz 3.50 GHz $6,841.00
Xeon E7-4809 v4 8/20MB 2.10 GHz 2.10 GHz $1,223.00
Xeon E7-8893 v4 4/60MB 3.20 GHz 3.50 GHz $6,841.00

Table 2: Preferred Xeon E7 v4 Family Processors (Broadwell-EX)

 

On June 20, 2016, Intel released the 14nm Xeon E5-4600 v4 Product Family (Broadwell-EP), for four-socket servers, which was also somewhat of a surprise. To be honest, I am not a big fan of the E5-4600 v4 Family. The Xeon E5 is really meant for two-socket systems, and it does not seem to scale very well in a four-socket system. If you really need the higher total core counts and higher total memory limit that you would get from a Xeon E5-4600 v4 vs. a Xeon E5-2600 v4 system, I think you are better off to make the jump to a Xeon E7 v4 system (which will also get you more RAS features).

All of the Xeon E5-4600 v4 Family processors have relatively low base clock speeds, and the higher core count SKUs are actually quite expensive, basically in the same range as similar core count Xeon E7 v4 processors. If you really want a Xeon E5-4600 v4 system, then the model numbers shown in Table 3 are your best choices for SQL Server usage, for each physical core count. The ten-core Xeon E5-4627 v4 and eight-core Xeon E5-4655 v4 would be my preferred choices in most situations, since they are somewhat “frequency-optimized”, and have lower overall core counts, which will dramatically reduce your SQL Server 2016 licensing costs.

 

Model Cores/L3 Cache Base Clock Turbo Clock Price
Xeon E5-4669 v4 22/55MB 2.20 GHz 3.00 GHz $7,007.00
Xeon E5-4667 v4 18/45MB 2.20 GHz 3.00 GHz $5,729.00
Xeon E5-4660 v4 16/40MB 2.20 GHz 3.00 GHz $4,727.00
Xeon E5-4650 v4 14/35MB 2.20 GHz 2.80 GHz $3,838.00
Xeon E5-4640 v4 12/30MB 2.10 GHz 2.60 GHz $2,837.00
Xeon E5-4627 v4 10/25MB 2.60 GHz 3.20 GHz $2,225.00
Xeon E5-4655 v4 8/30MB 2.50 GHz 3.20 GHz $4,616.00

Table 3: Preferred Xeon E5-4600 v4 Family Processors (Broadwell-EP)

In many situations, you would be much better off to get two, very fast Xeon E5-2600 v4 based two-socket database servers rather than one Xeon E7 v4 based four-socket database server, assuming you can split your workload across two database servers.

AES-NI Encryption Support in SQL Server 2016

Microsoft’s Bob Dorr has recently consolidated a series of CSS posts about many low-level performance improvements in SQL Server 2016. One of these posts, SQL 2016 – It Just Runs Faster – AlwaysOn AES-NI Encryption describes how SQL Server 2016 improved and simplified Endpoint creation for AlwaysOn AGs to default to AES, and to better leverage hardware support for AES-NI (when you are also running on Windows Server 2012 R2 or newer).

Intel describes AES-NI this way:

Intel AES New Instructions (Intel AES-NI) are a set of instructions that enable fast and secure data encryption and decryption. AES-NI are valuable for a wide range of cryptographic applications, for example: applications that perform bulk encryption/decryption, authentication, random number generation, and authenticated encryption.

Intel provides more complete documentation of AES here:

Intel Advanced Encryption Standard (Intel AES) Instructions Set

Now that we have a better idea of what AES-NI is, we need to know which server processors have AES-NI support. AES-NI was introduced with the 32nm Westmere microarchitecture. In the server space, this means the Intel Xeon 5600 product family (Westmere-EP) for two-socket servers and the Intel Xeon E7-4800/8800 product family (Westmere-EX) for four and eight-socket servers. Any newer Intel product family will also have AES-NI support.

These product families were released in Q1 2010 and Q2 2011 respectively, so they are both pretty old by modern standards. If you are planning to upgrade to SQL Server 2016, I would hope that you would use a new server with newer processors (ideally the latest 14nm Broadwell-EP or Broadwell-EX).

You can also use CPU-Z to confirm whether a particular processor has AES-NI support. Just to confuse things, CPU-Z displays AES-NI support as “AES”, which is the name of the broader standard. Figure 1 shows AES as one of the supported instructions for an Intel Xeon X5660 processor.

 

image

Figure 1: CPU-Z CPU Details for Intel Xeon X5650

 

Hardware Extension Support in SQL Server 2016

Microsoft’s Bob Dorr has recently consolidated a series of CSS posts about many low-level performance improvements in SQL Server 2016. One of these, How It Works: SQL Server 2016 SSE/AVX Support talks about how SQL Server 2016 added the use of SSE and AVX instructions in various code paths to improve performance when your processor supports one of those instruction sets.

Unless you are a hardware enthusiast, you might be wondering what these instructions are and how you can determine whether your processor supports them or not. First, we have some basic definitions:

Advanced Vector Extensions (AVX) were introduced in the server space with the Sandy Bridge-EP architecture, which was released in Q1 2012. This was the Intel Xeon E5-2600 Product Family. This means that if you have a server with Intel Xeon E5-2600 (Sandy Bridge-EP), Intel Xeon E5-2600 v2 (Ivy Bridge-EP), Intel Xeon E5-2600 v3 (Haswell-EP), or Intel Xeon E5-2600 v4 (Broadwell-EP) processors, you will have AVX support which SQL Server 2016 will use for better performance.

You will also have AVX support with the Intel Xeon E7-4800/8800 v2 (Ivy Bridge-EX), Intel Xeon E7-4800/8800 v3 (Haswell_EX), and Intel Xeon E7-4800/8800 v4 (Broadwell-EX) product families. Anything older than these families will not have AVX support.

This is yet another reason to use a new server when you upgrade to SQL Server 2016 (which is a good idea anyway for lots of other reasons).

Advanced Vector Extensions 2 (AVX2), is a newer version of AVX that was introduced with the Haswell-EP/EX architecture. If you have a Haswell-EP/EX or Broadwell-EP/EX processor, then you will have AVX2 support.

Streaming SIMD Extensions (SSE) are a much older instruction set that were introduced back in 1999. Since then, there have been several newer versions such as SSE2, SSE3, SSE4.1, and SSE4.2. The latest SSE4.2 version was introduced in the Nehalem-EP/EX architecture, which came out in Q1 2009 and Q1 2010 respectively. This means that the Intel Xeon 5500 (Nehalem-EP) and Intel Xeon 7500 (Nehalem-EX) Product families are the oldest models that will have SSE4.2 support. From Bob’s post, it appears that the same code path in SQL Server 2016 will be used if you have any version of SSE (but you don’t have AVX or AVX2 support), so even much older Xeon processors will have some level of SSE support. Just to be clear, AVX and AVX2 are newer and better than any version of SSE.

The CPU-Z utility shows the various extension instructions supported by your processor. As you can see in Figure 1, the Intel Xeon E5-2690 supports the AVX instruction set.

image

Figure 1: Intel Xeon E5-2690 CPU Details

A current model Intel Core i7-6700K Skylake desktop processor supports the newer FMA, and Transactional Synchronization Extensions (TSX) instructions, as shown in Figure 2. These were both introduced with the Haswell microarchitecture, and they might be useful in a future version of SQL Server, if Microsoft decides to use them.

image

 Figure 2: Intel Core i7-6700K CPU Details

SQL Server Diagnostic Information Queries for June 2016

This month, I have several improvements in the SQL Server 2014 and 2016 sets, along with additional comments and documentation in the SQL Server 2012, 2014 and 2016 sets. One new feature is a series of six dashes after each query to make them easier to parse by people who use PowerShell to run the queries and collect the results. I have gotten quite a bit of interest about making a special version of these queries for SQL Database in Microsoft Azure. So, I will be doing that pretty soon.

Rather than having a separate blog post for each version, I have just put the links for all six major versions in this single post. There are two separate links for each version. The first one on the top left is the actual diagnostic query script, and the one below on the right is the matching blank results spreadsheet, with labeled tabs that correspond to each query in the set. 

Here are links to the latest versions of these queries for SQL Server 2016, 2014 and 2012:

SQL Server 2016 Diagnostic Information Queries (June 2016)

SQL Server 2016 Blank Results

SQL Server 2014 Diagnostic Information Queries (June 2016)

SQL Server 2014 Blank Results

SQL Server 2012 Diagnostic Information Queries (June 2016)

SQL Server 2012 Blank Results

Here are links to the most recent versions of these scripts for SQL Server 2008 R2 and older:

Since SQL Server 2008 R2 and older are out of Mainstream support from Microsoft (and because fewer of my customers are using these old versions of SQL Server), I am not going to be updating the scripts for these older versions of SQL Server every single month going forward.  I started this policy a while ago, and so far, I have not heard any complaints. I did update these queries slightly in January 2016 though.

SQL Server 2008 R2 Diagnostic Information Queries (CY 2016)

SQL Server 2008 R2 Blank Results

SQL Server 2008 Diagnostic Information Queries (CY 2016)

SQL Server 2008 Blank Results

SQL Server 2005 Diagnostic Information Queries (CY 2016)

SQL Server 2005 Blank Results

The basic instructions for using these queries is that you should run each query in the set, one at a time (after reading the directions for that query). It is not really a good idea to simply run the entire batch in one shot, especially the first time you run these queries on a particular server, since some of these queries can take some time to run, depending on your workload and hardware. I also think it is very helpful to run each query, look at the results (and my comments on how to interpret the results) and think about the emerging picture of what is happening on your server as you go through the complete set. I have some comments in the script on how to interpret the results after each query.

After running each query, you need to click on the top left square of the results grid in SQL Server Management Studio (SSMS) to select all of the results, and then right-click and select “Copy with Headers” to copy all of the results, including the column headers to the Windows clipboard. Then you paste the results into the matching tab in the blank results spreadsheet.

About half of the queries are instance specific and about half are database specific, so you will want to make sure you are connected to a database that you are concerned about instead of the master system database. Running the database-specific queries while being connected to the master database is a very common mistake that I see people making when they run these queries.

Note: These queries are stored on Dropbox. I occasionally get reports that the links to the queries and blank results spreadsheets do not work, which is most likely because Dropbox is blocked wherever people are trying to connect.

I also occasionally get reports that some of the queries simply don’t work. This usually turns out to be an issue where people have some of their user databases in 80 compatibility mode, which breaks many DMV queries, or that someone is running an incorrect version of the script for their version of SQL Server.

It is very important that you are running the correct version of the script that matches the major version of SQL Server that you are running. There is an initial query in each script that tries to confirm that you are using the correct version of the script for your version of SQL Server. If you are not using the correct version of these queries for your version of SQL Server, some of the queries are not going to work correctly.

If you want to understand how to better run and interpret these queries, you should consider listening to my three latest Pluralsight courses, which are SQL Server 2014 DMV Diagnostic Queries – Part 1SQL Server 2014 DMV Diagnostic Queries – Part 2 and SQL Server 2014 DMV Diagnostic Queries – Part 3. All three of these courses are pretty short and to the point, at 67, 77, and 68 minutes respectively. Listening to these three courses is really the best way to thank me for maintaining and improving these scripts…

Please let me know what you think of these queries, and whether you have any suggestions for improvements. Thanks!

Performance and Stability Related Fixes in Post-SQL Server 2012 SP3 Builds

As of January 17, 2017, there have been seven Cumulative Updates (CU) for the Service Pack 3 branch of SQL Server 2012. There have been a fairly high number of hotfixes in every one of these Cumulative Updates, as more people are using SQL Server 2012 Service Pack 3. If you are running SQL Server 2012 Service Pack 3, I really think you should be running the latest SQL Server 2012 Cumulative Update. Right now, that means Service Pack 3, CU7 (Build 11.0.6579), which was released on January 17, 2017. 

Table 1 shows the SQL Server 2012 SP3 CU builds that have been released so far.

Build Description Release Date
11.0.6290 SP3 RTM November 22, 2015
11.0.6518 SP3 CU1 January 18, 2016
11.0.6523 SP3 CU2 March 21, 2016
11.0.6537 SP3 CU3 May 16, 2016
11.0.6540 SP3 CU4 July 18, 2016
11.0.6544 SP3 CU5 September 20, 2016
11.0.6567 SP3 CU6 November 16, 2016
11.0.6579 SP3 CU7 January 17, 2017
     

Table 1: SQL Server 2012 SP3 CU Builds

 

You can follow the KB article link below to see all of the CU builds for the SQL Server 2012 Service Pack 3 branch.

SQL Server 2012 SP3 Build Versions

Like I did for the SQL Server 2012 SP2 branch, I decided to scan the hotfix list for all of the Cumulative Updates in the SP3 branch, looking for performance and general reliability-related fixes for the SQL Server Database Engine. I came up with the list below, but this listing is completely arbitrary on my part. You may come up with a completely different list, based on what specific SQL Server 2012 features you are using.

Here are the fixes in the Service Pack 3 branch:

SQL Server 2012 SP3 Cumulative Update 1 (Build 11.0.6518), 8 total public hot fixes

FIX: You cannot use the Transport Layer Security protocol version 1.2 to connect to a server that is running SQL Server 2014 or SQL Server 2012

FIX: SQL Server may crash when a request for execution of a remote stored procedure contains incomplete definition of arguments

FIX: You receive error messages when you run a query that uses tempdb in SQL Server

An update to enable the “-k” startup parameter to control the rate that work files can spill to tempdb is available for SQL Server 2012 Service Pack 3

FIX: The CHANGETABLE function in a query returns incorrect results when Change Tracking is enabled for a SQL Server database

 

SQL Server 2012 SP3 Cumulative Update 2 (Build 11.0.6523), 20 total public hot fixes

FIX: Slow performance when you query numeric data types from an Oracle database

FIX: Access violation when you execute a stored procedure that uses a cursor on a table variable in SQL Server

FIX: An assertion failure occurs on the secondary replica when you use the AlwaysOn Availability Groups feature in SQL Server 2012

FIX: Numeric overflow when you run a query that spills more than 65,535 extents to tempdb in SQL Server 2014 or 2012

FIX: Column data is deleted when you update another column in a table in SQL Server 2012

FIX: SMK initialization fails on one node of a SQL Server 2012 failover cluster

FIX: SQL Server stops responding when you back up the certificate that is used to encrypt the database encryption key in SQL Server 2012 or SQL Server 2014

FIX: XA transactions aren’t cleaned when you exit a Java application in an instance of SQL Server

FIX: Error occurs when you try to drop or delete filegroups or partition schemes and functions in SQL Server

FIX: The Log Reader Agent stops intermittently and an Access Violation occurs in SQL Server 2012

FIX: Error when you use the replication feature in SQL Server 2014 or SQL Server 2012

FIX: Access violation and the program restarts when you change an extended events session in SQL Server 2014 or 2012

 

SQL Server 2012 SP3 Cumulative Update 3 (Build 11.0.6537), 23 total public hot fixes

FIX: You do not have the permissions to execute the system sp_readerrorlog stored procedure in SQL Server 2012

FIX: Filestream directory is not visible after an AlwaysOn replica is restarted in SQL Server 2012

FIX: Cannot alter column because it is enabled for Replication or Change Data Capture error occurs after a database is restored to a SQL Server that does not support change data capture

FIX: Error 1478 when you add a database back to the AlwaysOn availability group in SQL Server 2012

FIX: “Cannot resolve the collation conflict” error when you apply a snapshot to the subscriber database in SQL Server

FIX: “A severe error occurred on the current command” when a Table-Valued User-Defined function is referred to by a synonym

FIX: Creating a database on a system that has a large amount of memory installed takes longer

FIX: “Non-yielding Scheduler” error when versioning cleanup task runs on a SQL Server AlwaysOn secondary replica

FIX: FileTables in an AlwaysOn availability group become unavailable after failover in an instance of SQL Server 2014 or 2012

FIX: sys.dm_db_index_usage_stats missing information after index rebuild on SQL Server 2012

FIX: Memory corruption causes an access violation in an instance of SQL Server 2014 or 2012

 

SQL Server 2012 SP3 Cumulative Update 4 (Build 11.0.6540), 19 total public hot fixes

FIX: SQL Server crashes when you run a remote query in a stored procedure by using an invalid user name

FIX: Storage device overhead when you back up data or log files to a network share in SQL Server 2014 or 2012

FIX: Memory leak on the AlwaysOn secondary replica when change tracking is enabled in SQL Server

Transaction log backup failure on the secondary replica prevents subsequent backups on Availability Replicas in SQL Server 2012

FIX: SQL Server 2012 failover cluster diagnostic log does not accurately reflect the failure_condition_level setting

FIX: DBCC CHECKDB doesn’t report metadata inconsistency of invalid filegroups in its summary in SQL Server 2014 and SQL Server 2012

 

SQL Server 2012 SP3 Cumulative Update 5 (Build 11.0.6544), 20 total public hot fixes

FIX: Assertion failures occur when you query the database-state information in SQL Server 2012

CPU usage increases significantly when you execute queries that contain CHANGETABLE functions in SQL Server 2012 Service Pack 3

FIX: Queries that run against secondary databases always get recompiled in SQL Server

SQL Server crashes because of an access violation error that occurs while it reads data from an event file target

SQL Server 2014 or 2012 doesn’t start after you configure the tempdb database to use a very small log file

Unexpected growth of tempdb data files when using SQL Server Service Broker

“The log backup chain is broken” error when the log backup process fails in SQL Server

Operating system error 32 when you restore a database in SQL Server 2014 or 2016

 

SQL Server 2012 SP3 Cumulative Update 6 (Build 11.0.6567), 11 total public hot fixes

FIX: DBCC CHECKFILEGROUP reports false inconsistency error 5283 on a database that contains a partitioned table in SQL Server

Calculation using two measure time values in iterations returns negative values in SQL Server 2012, 2014, or 2016

FIX: TDE encrypted Databases go in suspect state during the recovery phase when you restart SQL Server 2012

FIX: Automatic failover doesn’t occur after database mirroring stops unexpectedly

FIX: Incorrect full-text keys are recorded for the rows that aren’t indexed correctly by a full-text index in SQL Server 2012

FIX: Rebuilding a nonclustered index to add new columns by using CREATE INDEX together with the DROP_EXISTING=ON and ONLINE=ON clauses causes blocking

FIX: Error 3456 “Could not redo log record” occurs, causing replicas to be suspended or repeated behavior in SQL Server

 

SQL Server 2012 SP3 Cumulative Update 7 (Build 11.0.6579), 11 total public hot fixes

FIX: An Always On secondary replica goes into a disconnecting state

FIX: The Target Recovery Time of a database set to a nonzero value causes an assertion and a lease timeout in SQL Server 2014

“A digitally signed driver is required” warning when you install SQL Server packages in Windows Server 2016 and Windows 10

FIX: On failover, the new secondary replica stops accepting transaction log records until the instance is restarted in SQL Server

FIX: Assert memory dump on a mirror server in SQL Server 2012

FIX: Changing the data type and then updating the table with more than 4,000 records causes database corruption

 

Once again, the idea here is to give you a lot of concrete reasons to want to stay current with the latest SQL Server 2012 SP and CU, by pointing out some of the more valuable fixes in each CU in the Service Pack 3 branch.  If my opinion does not sway everyone, this relatively new Microsoft KB article might be more convincing:

Announcing updates to the SQL Server Incremental Servicing Model (ISM)

Another very useful resource is this Microsoft KB article:

Recommended updates and configuration options for SQL Server 2012 and SQL Server 2014 used with high-performance workloads

Happily, Microsoft has been updating this KB article with new information, so you might want to read it again, if you have not done so already.