Upcoming webinar: CI and CD with SSDT and Living to Tell About It

Unfortunately, due to unforeseen circumstances, the webinar had to be delayed to a later date. I’ll post an update as soon as a new date will be scheduled. I’m delivering an upcoming webinar in PASS Global Hebrew Virtual Group: CI and CD with SSDT and Living to Tell About It, on September 25th, 17:00 Israel Standard Time (GMT+3) Details and registration: https://globalhebrew.pass.org/MeetingDetails.aspx?EventID=14256 Meet SSDT (SQL … Continue reading Upcoming webinar: CI and CD with SSDT and Living to Tell About It

#TSQL2sday : I wish SQL Server had better Table Partitioning

For this month’s T-SQL Tuesday, Kevin Chant asked us to dream up our fantasy SQL Server feature.

The feature I wish we had is Table Partitioning, but… Better. Unfortunately, the feature by large remained the same way since its release in 2005, without any meaningful improvements (besides some parallelism and statistics maintenance improvements).

But I think Microsoft can do much better. Continue reading #TSQL2sday : I wish SQL Server had better Table Partitioning

Science FTW!

Planning to Increase Cost Threshold for Parallelism – Like a Smart Person!

When administrating a SQL Server instance with multiple CPU cores and heavy workload, it’s common to see SQL Server creating and using execution plans with parallelism. The instance configuration “cost threshold for parallelism” is what determines for SQL Server the minimum sub-tree cost before it starts considering to create a parallelism plan. The default “out-of-the-box” value of this configuration is 5.

 However, in some cases, we would want to increase the default configuration of “cost threshold for parallelism” to something higher than the Microsoft default of 5, thus decreasing the frequency in which SQL Server creates parallelism plans.

This is something we would usually want to do when we see too much CPU workload as a result of parallelism plans, and we would want to reduce it. 

But how can we know which new value we should use? Do we just throw a randomly high number such as 50 and see what happens (as is often recommended in most blogs)?

Well, no, we don’t actually have to do that.

We can do it like smart people.

Being smart is a good thing. Continue reading Planning to Increase Cost Threshold for Parallelism – Like a Smart Person!

Joins

The LOOP, HASH and MERGE Join Types

Today I’ll talk about the available JOIN operator types in SQL Server (Nested Loops, Hash and Merge Joins), their differences, best practices and complexity. For the samples in this post, we’ll use the free AdventureWorks database sample available here: http://msftdbprodsamples.codeplex.com/releases/view/4004 Introduction: What are Join Operators? A join operator is a type of an algorithm which the SQL Server Optimizer chooses in order to implement logical … Continue reading The LOOP, HASH and MERGE Join Types

These are not the duplicates you're looking for

The "IGNORE_DUP_KEY" option in Primary Keys and Unique Indexes

Unlike foreign keys, primary keys and unique indexes cannot be “untrusted”. There’s no “NOCHECK” option for unique constraints. The closest there is, is the “ignore_dup_key” option. “Hmm… That sounds interesting”, you must be thinking. But let me stop you right there, buddy. Read this before you go off doing something potentially dangerous… Very, VERY dangerous. But it does NOT mean that you can create such … Continue reading The "IGNORE_DUP_KEY" option in Primary Keys and Unique Indexes