Black Friday prices end in 21d 18h 28m — See the sale

Category: Configuration Settings

Microsoft Now Recommends You Set Max Memory to 75% and Min Memory to 0%.

Your queries won’t tune themselves. My 2027 Live Class Season Pass is $995 (normally $4,395), with live Fundamentals and Mastering classes plus recordings. Register by October 31 to join Fundamentals Week, November 2–6. See the pass.

Somehow I missed this a few years ago, and I bet a lot of y'all did too. Note the new "Recommended" column in the memory settings documentation:

Read more about Microsoft Now Recommends You Set Max Memory to 75% and Min Memory to 0%. 20 comments — Join the discussion

What Does Setting the SQL Server Compatibility Level Do?

Your queries won’t tune themselves. My 2027 Live Class Season Pass is $995 (normally $4,395), with live Fundamentals and Mastering classes plus recordings. Register by October 31 to join Fundamentals Week, November 2–6. See the pass.

If you right-click on a database in SQL Server Management Studio, you get an option to set Compatibility Level at the database level:

Read more about What Does Setting the SQL Server Compatibility Level Do? 25 comments — Join the discussion

Is There a Bug in SQL Server’s MAXDOP Calculation? (Update: Yes!)

I think I've found a bug in SQL Server setup's MAXDOP calculation, and I need you to take a second look. Setup is recommending MAXDOP 8:

Which is odd, because this is running on an AWS i3.16xlarge with 2 sockets, 2 NUMA nodes, 32 logical processors per node, 64 logical processors altogether. In this screenshot, I've laid Task Manager alongside setup so you can see what I mean:

Read more about Is There a Bug in SQL Server’s MAXDOP Calculation? (Update: Yes!) 21 comments — Join the discussion

Three Reasons to (Temporarily) Change Max Worker Threads

When you go to the deli, there's a "take a number" dispenser where you tear off a number and wait for your number to be called.

If you walked into a deli and you saw 50 people lined up all waiting their turn, and you went to take a number and the dispenser was completely empty, you'd say to yourself, "I think I'll come back later."

Read more about Three Reasons to (Temporarily) Change Max Worker Threads 10 comments — Join the discussion
Production DBA

Should you run SSAS/SSIS/SSRS on the SQL Server?

When you're building a new SQL Server, you're going to see a few intriguing checkboxes during setup.

The services are all free, right? You can just check the boxes for Machine Learning Services, R, Python, Data Quality Services, PolyBase, Integration Services, Analysis Services, and Reporting Services - it's not like you have to put more coins in the front of the server. So what's the drawback? Why not collect 'em all? What are the pros and cons?

Read more about Should you run SSAS/SSIS/SSRS on the SQL Server? 23 comments — Join the discussion
Performance Tuning

Checking for Strange Client Settings with sys.dm_exec_sessions

In my performance training class, people get really excited when I cover filtered indexes, computed columns, and indexed views.

Then they get a really strange expression on their face when I talk about one of the biggest drawbacks: if your connection options aren't set correctly, your delete/update/insert (DUI) operations will fail. That gave me a really fun time once when I implemented an indexed view, and they called me back the next day screaming because their app was down. My bad. (sigh)

Read more about Checking for Strange Client Settings with sys.dm_exec_sessions 11 comments — Join the discussion

Why Cost Threshold For Parallelism Shouldn’t Be Set To 5

CURRENT_YEAR()
Here it is, 2017. A full 20 years since SQL Server 7. Back then, there was a developer named Nick. Nick was on the development team, and apparently the query-costing-magic development was done on his machine. All of it. The magical metric was that for every second a query ran, it would cost another query buck. If a query ran for 5 seconds, meaning it cost 5 query bucks, the optimizer would start examining parallel plans.

Read more about Why Cost Threshold For Parallelism Shouldn’t Be Set To 5 36 comments — Join the discussion

Ten Ways to Set MAXDOP

Whenever I work with SQL Server, I'm amazed at how many ways there are to influence its behavior. For example, take the maximum degree of parallelism for a query. Just offhand, I thought of ten different ways you can tweak it:

1. At the server level with SSMS. In SSMS, right-click on the server, click Properties, Advanced, scroll down into the Parallelism section, and set MAXDOP to 1. Click OK. (Be aware that this blows your plan cache instantly.)

Read more about Ten Ways to Set MAXDOP 15 comments — Join the discussion

Five SQL Server Settings to Change

SQL Server ships with sane defaults, right? Well, sort of. SQL Server ships with pretty sane defaults for a single CPU socket server or for a development work station. Honestly, the defaults are good enough for many things, but there are a few gotchas. Changing these settings is quick, relatively painless, and can result in all around stability and happiness.

Read more about Five SQL Server Settings to Change 129 comments — Join the discussion