Press "Enter" to skip to content

Curated SQL Posts

Viewing Nested Lists in R with xfun::tabset()

Yihui Xie wants to document the contents of nested lists:

Complex nested lists in R can be difficult to explore and understand at a glance. The str() function is helpful for examining structure, but large nested lists can quickly become overwhelming.

While I was writing the documentation for tabsets in litedown, I almost laughed at myself for the support for nested tabsets, because I had no idea why anyone would want this feature. However, I suddenly realized that it can be a very useful tool for exploring nested lists in an interactive way, so I wrote a quick implementation: xfun::tabset().

Click through to see how it works.

Leave a Comment

Monitoring Query Plan Utilization in PostgreSQL

Ahmed Gouda shows how to use pgwatch to track query plan utilization:

The PostgreSQL ecosystem just introduced a new pg_stat_plans extension. It’s similar to pg_stat_statements but it tracks aggregated statistics for query plans instead of SQL statements.

It exposes a SQL interface to query those statistics via the pg_stat_plans view, and in this post, I will explore how easy it is to integrate such extensions with pgwatch for those who want to improve/customize the metrics gathered from a monitored database.

Click through for the demo.

Leave a Comment

The Final Month of Azure Data Studio

Rebecca Lewis plays a funeral dirge:

Azure Data Studio retires on February 28, 2026. No more updates, no more security patches, no more support. Microsoft announced this a year ago and has been pointing everyone toward VS Code with the MSSQL extension ever since.

Sounds straightforward. Install VS Code, add an extension, and carry on. Yet it is not really that simple, and it depends a lot on how you used ADS.

I appreciate that Rebecca has a table of functionality, including what is available right now and what is not yet ready. I remember trying the VS Code MSSQL extension early on and realizing just how much work they had to do, and it looks like they’ve done a good amount of that work. Running on Linux, I was always a proponent of Azure Data Studio, even when it was SQL Operations Studio and you had a messy bundle of files to install manually (I was one of the very early beta testers).

The good news is that I do believe the SQL Server tools team will continue development on this. The success of non-SSMS tools has been hit or miss, but having a multi-OS, developer-friendly way to interact with SQL Server is important.

Leave a Comment

DAX DATEADD Parameters and Calendar-Based Time Intelligence

Marco Russo and Alberto Ferrari check how two sets of functionality overlap:

The primary reason to adopt the new calendar-based time intelligence in Power BI is its flexibility. Classic time intelligence functions work out of the box and deliver meaningful results in most scenarios. However, to do so, they make assumptions about the calendar structure and the desired outcomes. Sometimes, the choices are not aligned with the user requirements, and developers need to author their own time intelligence calculations.

The new calendar-based time intelligence functions provide greater flexibility by allowing developers to configure parameters that drive the internal algorithms to meet diverse requirements. Using these parameters requires a precise understanding of the scenario for which they were built, which requires some attention to detail.

Click through to learn more.

Leave a Comment

Performing Log Shipping between SQL Server Versions

Greg Low answers a question:

One of the discussion lists that I participate in, had a brief discussion the other day about whether or not it’s possible to perform log shipping between differernt versions of SQL Server.

Specifically, can you do log shipping between SQL Server 2017 and SQL Server 2025?

Because the question was not in the header, it does not violate Betteridge’s Law of Headlines. Well done, Greg.

Leave a Comment

Notes on Migrating to PBIR Format

Nicky van Vroenhoven shares some notes:

Let me be clear: I really like and support the updates that Rui Romano has been pushing the last years!
In short, it brings:

  • Better support for CI / CD and source control 
  • Better integration for programmatic report updates, e.g. with LLM’s
  • More reliable merge outcomes with the PBIP and PBIR structures

With that being said, I do think some customers do not want to have preview features in production, so they will be cautious with the recent developments. Since the end of January, the PBIR format will be the default if you don’t take action.
If you don’t want to enable PBIR yet, or just want to know more about the transition, read on.

The idea of making a preview feature the default rubs me the wrong way. If it’s going to be the default, you should have the gumption to call it GA. If you’re not willing to call it GA for whatever reason, that means it’s not ready to be the default.

This is regardless of the fact that I like what the PBIR format offers and think companies should bias toward that direction.

Leave a Comment

Interoperability and OneLake Security

Aaron Merrill introduces a new whitepaper:

In our whitepaper, The future of data security is interoperability, we make the case for a different data foundation: interoperable security that’s defined once and enforced everywhere your data is used. Using OneLake security as the lens, it walks through the core concepts and architectural choices behind centralized policy definition with distributed, engine-level enforcement, and explores how fine-grained access controls and enterprise governance fit into a multi-engine world.   

Click through for Aaron’s summary and check out the link for the whitepaper itself, in PDF format.

Leave a Comment

Mirroring to OneLake without Public Internet Access

Paul Hernandez builds a (virtual) network:

Mirroring has been a transformative technology for data integrations tasks since the early Microsoft Fabric days. Moreover, this feature has been called “pain killer as a service” in community posts. In many projects, data sources to be mirrored are behind private networking and for security reasons they are not accessible using public internet. If you want to mirror, for example, an Azure SQL database, you’ll need a data gateway. According to the official docs: “If your Azure SQL Database is not publicly accessible and doesn’t allow Azure services to connect to it, you can set up virtual network data gateway or on-premises data gateway to mirror the data”.

In this post I’ll show you step-by-step how to set up connectivity to be able to use mirroring when Azure SQL allows only private access.

There are several steps involved, but the end result is worth it compared to not having the data at all or needing to make it accessible over the Internet.

Leave a Comment

Migrating from a Contained Availability Group

Warren Departee undoes a problem:

A client was running a Contained Availability Group in SQL Server 2022, but wasn’t using the AG Listener for their application connections. This negated most of the benefits the Contained AG was designed to provide. They also had some security misunderstandings and missteps, as this was built for them without any real knowledge transfer – one of the reasons they reached out to us for help. After review, it became clear that there was no need for a contained AG here, so we helped them migrate to a Basic Availability Group (SQL Server Availability Group in SQL Server Standard Edition) while preserving their database configurations and minimizing downtime.

Read on for a step-by-step process and a few hints on configuration.

Leave a Comment

Estimating Overall Fabric Capacity Utilization

Gilbert Quevauvilliers backs into a number:

I was recently working with a customer and one of the questions they had is we are going to be running an ingestion process. We want to know how much Fabric Capacity this will be consuming.

The challenge with this question is that in Fabric a background capacity gets smoothed over 24 hours.

For example, when looking at the Capacity Metrics App I can see my overall usage, but HOW MUCH CAPACITY IS IT CONSUMING?

Read on for the answer.

Leave a Comment