Press "Enter" to skip to content

Curated SQL Posts

Responding to “The Server is Slow”

Kevin Hill shares some consulting advice:

Stop. Don’t Open SSMS Yet.

You’ve heard it before: “The server is slow.”

What does that actually mean?

If you jump straight into SQL Server looking for blocking, bad queries, or a missing index, you’re working with bad input. And bad input = wasted time.

The real work starts before you ever connect to SQL Server.

Click through for some guidance on how to frame the conversation. Even if you aren’t a consultant, I think it’s a good idea to scope and triage the problem in a similar fashion before trying to dive in and see what you can find.

Comments closed

Regular Expression Counts and Positions in SQL Server 2025

Louis Davidson wraps up a series on regular expressions:

I am only combining them into a short version because they are, in how they work, very similar to all the other functions. I certainly will demonstrate all the functionality for each function, but not to the extra level I have in previous blogs.

This time, I will cover:

  • REGEXP_INSTR Returns the starting or ending position of the matched substring, depending on the option supplied.
  • REGEXP_COUNT Returns a count of the number of times that regex pattern occurs in a string.

Read on to see how these work in SQL Server 2025.

Comments closed

Types of Window Functions in SQL Server

I have the first of a two-part video up:

In this video, I walk through four categories of window function, plus a somewhat-related type of function in SQL Server. From there, I demonstrate how aggregate window functions and ranking window functions work.

The second part will come out next week and will cover the other types of window function. Otherwise, this was shaping up to be a 40-minute video and that’s a bit too long.

Comments closed

Troubleshooting Bulk Insertion in SQL Server

Rick Dobson lays out some common issues:

Most SQL bulk insert and SQL Server openrowset tutorials skip file access issues that can stop imports cold. Both the bulk insert statement and openrowset function rely on the SQL Server service account to read a source file. The SQL Server service account must have read permission on the file or its folder. It is also convenient to have read & execute as well as list folder content permissions. Also, non-standard source file locations (e.g., C:\Users\Public\Downloads) may not grant default read access to the SQL Server service account – always verify before use.

Click through for several recommendations, links to additional resources, and a few scripts along the way.

Comments closed

Using Sankey Diagrams in Power BI

Ben Richardson creates a visual:

Ever wished you could see exactly how customers move through your sales funnel, or how costs flow across your business?

A Sankey Diagram makes those flows visible, showing not just totals but how values split and connect between categories.

In Power BI, the Sankey Diagram is available as a custom visual from AppSource, designed to reveal relationships and flow patterns.

There are specific times and places for Sankey charts. It requires having a natural flow in your data—that is, you need different states of data, those states should typically only “move” in one direction, you have paths to get from one state to another, and there is enough variety in pathing that not all of the data is going to the same location. The more of these rules you violate, the less useful a Sankey diagram is.

Comments closed

Calendar-Based Time Intelligence in DAX

Marco Russo and Alberto Ferrari grab a calendar:

Since its first release in 2010, DAX has had a set of time intelligence functions to simplify calculations like year-to-date, year-over-year, and so on. However, the calculations only supported the Gregorian calendar, without addressing similar requirements for other calendars, such as the 4-4-5, ISO, and many other non-Gregorian calendars. With the classic time intelligence, the columns of the Date table were unknown to the time intelligence functions, with the only exception of the date column in the Date table, typically Date[Date].

Click through to see what Marco and Alberto have come up with.

Comments closed

Installing Older PowerShell Modules with Dependencies

Andy Levy needs an older version of dbatools:

I don’t recall where this came up (probably in SQLSlack), but I had a need to install an older version of dbatools to test something related to loading the dbatools.library library/dependency.

Read on to see how Install-Module won’t quite cut it because it doesn’t bring in the older versions of dependencies. But there is an alternative.

Comments closed

SQL Server 2025 RC1 Released

Microsoft has a new release candidate:

Currently SQL Server 2025 (17.x) Preview includes features available through release candidate (RC) 1.

In addition to features announced previously, RC 1:

  • Fixes known issues that were present in previous preview releases.
  • Introduces feature improvements.

Click through for the changes. There aren’t a huge number of updates in this candidate, and it came out a bit quicker than I thought it would, with RC0 dropping on August 25th. Given that Ignite isn’t until November 18th, that does still give a fair amount of time for an RC2 to come out, and it’ll be interesting to see if they go that long or release SQL Server 2025 RTM earlier than Ignite.

Comments closed

Building Lists in Markdown

Mike Robbins has a list and checks it twice:

In Part 1: Getting Started with Markdown for Technical Writers, I introduced the basics of Markdown, including how to format both ordered and unordered lists. This article builds upon that foundation, providing everything you need to know about using lists in Markdown, from basic syntax to advanced formatting techniques.

As a technical writer, understanding how and why to use lists in Markdown isn’t just about syntax. It’s about clarity, structure, accessibility, and intent.

Read on to see how to create ordered and unordered lists, as well as several tips around when to use each and appropriate nesting of lists.

Comments closed