How to Un-Heap Your Heaps?
Today’s script has something very interesting to do with Heap tables. Specifically, how to turn them into something that’s not a heap. Continue reading for more info…
Read More »How to Un-Heap Your Heaps?Today’s script has something very interesting to do with Heap tables. Specifically, how to turn them into something that’s not a heap. Continue reading for more info…
Read More »How to Un-Heap Your Heaps?Watch now! In this session, the second of a 2-part series, we will cover the rich tools, features, and methodologies in SSDT that allow DBAs to implement a continuous database development lifecycle, and how to solve common problems and edge cases.
This webinar was delivered as part of the PASS Global Hebrew Virtual Chapter, and as such is presented in Hebrew.
Watch now! In this session, the first of a 2-part series, we will learn what is Git Source Control? What are CI/CD Pipelines? What are Unit Tests? These are all topics that each DBA must familiarize themselves with before integrating with the software development lifecycle.
This webinar was delivered as part of the PASS Global Hebrew Virtual Chapter, and as such is presented in Hebrew.
Last week, I called up Matan Yungman, and offered to replace Guy Glantser as a co-host in SQL Server Radio, while Guy is away on holiday in New Zealand.
We recorded episode 111 in English, and episode 117 in Hebrew.
Check them out!
For this month’s T-SQL Tuesday, Kevin Chant asked us to dream up our fantasy SQL Server feature. I love this topic and so I had to join in on this as a late (and first-time) contributor.
My ask from Microsoft for SQL Server is something that…. Well… It should be simple. It should’ve been implemented YEARS ago. I’m thinking somewhere around the year 2005.
Read More »T-SQL Tuesday #118 – I wish SQL Server had better Table PartitioningOn October 7th, I delivered my presentation about Advanced Dynamic Search Queries at the Israeli Data Platform Meetup, at Microsoft Reactor Tel-Aviv!
Watch here.
Sometimes, when you have a table with an IDENTITY column, there could be scenarios in which weird “gaps” are created between different IDs.
There can be several possible causes for this:
1. The most obvious cause is when rows are deleted from the table. If many rows are deleted from a table with an IDENTITY column, it’s obviously expected that nothing would “fill” up the “gaps” that these rows have left. IDENTITY values only go one way, they don’t automatically re-fill deleted values retroactively.
2. When a ROLLBACK is performed on a transaction after inserting into a table with an IDENTITY column, the increase in the IDENTITY value is NOT rolled back. So even if the row wasn’t actually inserted, the IDENTITY value is still increased. This can happen both with single-row INSERT commands, as well as BULK insertions. So if, for whatever reason, a lot of insertions are rolled-back in your database, you may see a lot of these “gaps”.
3. There’s a special mechanism, specifically in SQL Server 2012, which “pre-allocates” IDENTITY values for a table, and it does this in memory. So when the SQL service is restarted, next time you insert a value into the table, the IDENTITY value would “jump” by 1000 or 10000 (depending on the column data type). This happens in SQL 2012 only, and was reportedly fixed in later versions. More info about it in this blog post by Ahasan Habib.
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.
Read More »Planning to Increase Cost Threshold for Parallelism – Like a Smart Person!Today I’ll talk about the main physical JOIN operator types in SQL Server (Nested Loops, Hash and Merge Joins), their differences, best practices, and complexity (which determines when the SQL Server optimizer would use them in execution plans).
Read More »The LOOP, HASH and MERGE Join TypesUnlike foreign keys, primary keys and unique indexes cannot be “untrusted”. There’s no “NOCHECK” option for unique constraints. The closest… Read More »The "IGNORE_DUP_KEY" option in Primary Keys and Unique Indexes