Press "Enter" to skip to content

Month: December 2026

Cardinality Estimation off of the Histogram

Erik Darling has a video:

But anyway, today we’re going to talk about off-histogram cardinality because recently I opened a feedback item with my dear and good friends at Microsoft with a humble suggestion to improve to improve our lot in life when dealing with this. And we’re going to talk about that. Down in the video description, you will find so many helpful links. Your mind will spin, boggle. You’ll, I don’t know. I don’t even know if your socks are going to stay on. You know, as a wise man once said, you better hope you have your wood screws in. You know, blow your doors off.

Click through to learn more about the topic. Erik shows how the optimizer can miss on data outside of the band that statistics cover, both over- and under-estimating the number of rows. When you’re working with telemetry data (for example), this can end up being a significant issue.

Thankfully, the police weren’t coming for Erik that time, so he was able to finish the video. Also, vote on Erik’s feedback idea. I did my part by clicking a button!

Leave a Comment

Error Action Sequences in Dataflows Gen2

Chris Webb handles an error:

Following on from my post two weeks ago about report bursting in Dataflows Gen2, I’ve learned something new about action sequences in M (thanks to Curt Hagenlocher for this, although it is mentioned in Ben Gribaudo’s post on actions) which deserves its own post.

Let’s take the first example I gave in that previous post showing how to send two emails using M in a Dataflow Gen2:

Click through for the issue and how you can build the equivalent of a try-catch block in M.

Leave a Comment

Moving TDE Certificates without Files

Jordan Boich performs a migration:

I’ve been automating a lot of the tedious and routine migration tasks for our team for the past few months. Leveraging tools like PowerShell and Azure DevOps Pipelines to consistently deliver results and accomplish the majority of the heavy lifting relating to DBA toil allows us to focus on other tasks and initiatives. While improving my pipeline process, I noticed that the TDE cert migration portion was unreliable and failing often. The specific step backed up the .cer and .pvk file to a network share and attempted to assign file share permissions, and restore the cert with its pvk to the destination server. Connectivity to the share was unreliable, and trying to play permission assignments to a share in flight proved to be more challenging than I was hoping. With that, I sought out a new way to skin the cat. Turns out, you can leverage the certificate’s binary metadata to migrate the TDE cert to another server without having to worry about physical .cer and .pvk files to make that possible. You don’t need a pipeline for this to be useful. Here’s what it looks like by hand.

Click through for the process.

Leave a Comment