Press "Enter" to skip to content

Author: Kevin Feasel

Maintaining PostgreSQL without Superuser

Radim Marek doesn’t need special access:

How many people/services have superuser access to your PostgreSQL cluster(s)? Did you ever ask why your software engineers might need it? Or your BI team? Why those use cases require same privileges as someone who can drop your databases?

The answer isn’t because these operations are inherently dangerous – it’s because PostgreSQL historically offered limited options for operational access or simply because not enough people are aware of the options. So the common practice is to either got basic permissions or handover the keys to the kingdom.

Read on to see how pre-defined roles can help. These have recently come into the product, so read on to see how different versions of PostgreSQL have extended this functionality.

Leave a Comment

Adding Carousel Buttons in Power BI

Ben Richardson builds a carousel:

If you’ve ever tried to cram too many charts onto one report page, you know what happens.

The page gets cluttered, users don’t know where to look, and the story you’re trying to tell gets lost.

Carousel buttons fix that problem.

Instead of stacking visuals side by side:

You place them in the same spot and let people flip through them like slides.

It feels cleaner, takes up less space, and keeps the audience focused.

Click through to see how it works. Note that carousels can be quite useful, but they also go against one of the tenets of dashboard design: glanceability. If I need to click, drag, scroll, or otherwise manipulate the dashboard before I can see the information I need to act, it’s not glanceable—I cannot gather relevant information at a glance and act upon it.

In other words, if I’m giving somebody an interactive Power BI report with the intent that the person will dig into results, then a carousel can be quite reasonable. But if I’m creating a dashboard that should be up most of the time and available for people to see, carousels aren’t a great call.

Leave a Comment

PostgreSQL and (Lack of) Clustered Indexes

Brent Ozar shares a surprise if you’re coming from the SQL Server world:

Postgres starts with a very different assumption: it uses multi-version concurrency control (MVCC, or what SQL Server folks call RCSI) by default, right from the get-go. When we update rows, Postgres automatically makes new versions of the rows, storing them inside the same table. There’s no need to enable it – it’s on for all databases, by default.

So because Postgres is constantly creating new versions of rows, it doesn’t really make sense to store the table itself in some kind of order.

Every table is a heap.

This fundamental storage difference has some ramifications for query tuning and indexing strategy that makes the two platforms quite different.

Leave a Comment

TDE and Checksum Performance Penalties in PostgreSQL

Christoph Berg performs some tests:

It’s been a while since the last performance check of Transparent Data Encryption (TDE) in Cybertec’s PGEE distribution – that was in 2016. Of course, the question is still interesting, so I did some benchmarks.

Since the difference is really small between running without any extras, with data checksums turned on, and with both encryption and checksums turned on, we need to pick a configuration that will stress-test these features the most.

Read on to see the test setup and how things perform. I’m a bit surprised that there’s so little throughput difference here.

Leave a Comment

Finding Power BI Operations from the Capacity Metrics App

Chris Webb notes something that has come out recently:

It’s the week of Fabcon Europe and you’re about to be overwhelmed with new Fabric feature announcements. However there is a new blink-and-you’ll-miss-it feature that appeared in the latest version of the Fabric Capacity Metrics App (released on 11th September 2025, version 47) that won’t get any fanfare but which I think is incredibly useful – it allows you to link the Power BI operations (such as queries or refreshes) you see in the Capacity Metrics App back to Workspace Monitoring, Log Analytics or Profiler so you can get details such as the query text.

Click through to see how it works.

Leave a Comment

Performing Data Validation with RegEx in SQL Server 2025

Reitse Eskens tries out regular expression support in SQL Server 2025:

One of the new features in SQL Server 2025 is that you can now use regular expressions directly in your T-SQL queries. Now, regular expressions (or RegEx) have never been a syntax that’s easy to read. There are a lot of brackets, dashes and other symbols that make no sense when you first see them. Before delving into how these can be used in SQL Server, a few basics are provided to get you started, along with a link to a website for further learning.

Read on for a quick primer and a bit of pain when it comes to performance.

Leave a Comment

Challenges of High-Dimensional Optimization

John Mount lays out a demonstration:

My experience is that common objective functions tend to be structured and full of coincidences and symmetries. And because they have these structures they are hard to optimize.

Let’s work up what I claim to be a fairly typical optimization problem that arises from planning or scheduling. I’ll call it the train arrival schedule problem.

Click through for the article, which includes demonstration code.

Leave a Comment

Comparing the ROC Curve to a Precision-Recall Curve

Ivan Palomares Carrascosa looks at two ways to plot classification model trade-offs:

When building machine learning models to classify imbalanced data — i.e. datasets where the presence of one class (like spam email for example) is much less frequent than the presence of the other class (non-spam email, for instance) — certain traditional metrics like accuracy or even the ROC AUC (Receiving Operating Characteristic curve and the area under it) may not reflect the model performance in realistic terms, giving overly optimistic estimates due to the dominance of the so-called negative class.

Precision-recall curves (or PR curves for short), on the other hand, are designed to focus specifically on the positive, typically rarer class, which is a much more informative measure for skewed datasets due to class imbalance.

Read on to see how these two curves can diverge and when you might trust one over the other. Ivan’s post does rely on the idea of the positive class being the smaller one and the dataset being markedly unbalanced

Leave a Comment

Substring Search with Regular Expressions in SQL Server

Louis Davidson continues a series on regular expressions:

The REGEXP_SUBSTR function extracts parts of a string based on a regular expression pattern. It has some similarieties with the SUBSTRING function, but with some important (and interesting) differences. This function returns Nth occurrence of a substring that matches the regex pattern.

Read on to see how it compares to the traditional SUBSTRING() function.

Leave a Comment

Accelerated Database Recovery and NOLOCK

Brent Ozar has a new episode of Customers Say the Darndest Things:

I have never seen a T-SQL feature that people love as much as NOLOCK.

I keep thinking I’ve written enough blog posts about it, but a client came up with a new one:

We use SQL Server 2022’s Accelerated Database Recovery, which keeps copies of versions inside the table. Plus, we don’t use transactions – our inserts, updates, and deletes are done one table at a time, and your demos always have transactions in them, so we’re not affected.

That’s not how this works. That’s not how any of this works.

It might be because it’s early in the morning when I type this out, but I’m having a hard time even conceptualizing what the customer could be thinking here. Brent does lay it out in the comments below, however, and yeah, I’d still raise an eyebrow if someone said that out loud to me.

But the moral of the story is, find someone who loves you like T-SQL developers love NOLOCK.

Leave a Comment