Press "Enter" to skip to content

Curated SQL Posts

Training, Serving, and Deploying Scikit-Learn Models via FastAPI

Abid Ali Awan serves a model:

In this article, you will learn how to train a Scikit-learn classification model, serve it with FastAPI, and deploy it to FastAPI Cloud.

Topics we will cover include:

  • How to structure a simple project and train a Scikit-learn model for inference.
  • How to build and test a FastAPI inference API locally.
  • How to deploy the API to FastAPI Cloud and prepare it for more production-ready usage.

Click through for the process.

Leave a Comment

Cross-Workspace MLflow Logging Available in Microsoft Fabric

Ruixin Xu announces a feature now generally available:

Cross-workspace logging works through the synapseml-mlflow package, which provides a Fabric-compatible MLflow tracking plugin. The core idea is simple: set the MLFLOW_TRACKING_URI* to point at your target workspace and use standard MLflow commands. Your experiments, metrics, parameters, and registered models land in the workspace you choose — not just the one you’re running in.

Read on for the full announcement.

Leave a Comment

Filtered Indexes and Computed Columns

Greg Low has a public service announcement:

On a client site some years back, I came across a situation (unfortunately too common) where a column in a table was being used for two purposes. It could either hold an integer value or a string. Only about 100 rows out of many millions had the integer value. Some of the client code needed to calculate the maximum value when it was an integer. First step I tried was to add a persisted calculated column like so:

After that, Greg tried to create a filtered index. Read on to see how that worked.

Leave a Comment

Testing Your SQL Server Backups

Vlad Drumea stresses the need to test:

Folks think that if they just take backups regularly, and their backup intervals match their recovery point objectives, then they can rest assured knowing (more like falsely thinking) they have backups from which to restore in case something bad happens to a database or to the entire instance.

Yeah, there are several things that can go wrong, even beyond the solid answers Vlad provides. Think about developers taking one-off backups that break the log chain, overly-aggressive purge processes that delete backups before they’re fully moved to long-term storage, etc.

Definitely check out Vlad’s post. If you’re interested, I also have a video series on YouTube that covers SQL Server backup and restore.

Leave a Comment

Postgres Performance on Linux 7.0 and Benchmark Artifacts

Christophe Pettus digs into a finding:

A benchmark came out of AWS earlier this month showing PostgreSQL throughput on Linux 7.0 dropping to 0.51x what the same workload produced on Linux 6.x. The Phoronix headline wrote itself. Hacker News did what Hacker News does. By the end of the week, I had been asked by three separate clients whether they needed to hold their kernel upgrades.

They don’t. Almost nobody does.

Read on for the answer, including a dive into the nature of the problem and a quick-and-easy fix for most cases.

Leave a Comment

Maestro Now 1.1.0

Will Hipson lays out an update:

maestro has officially graduated to stable release with version 1.0.0 back in January 2026 and now its latest version 1.1.0. This marks a commitment to maintaining a stable API and increased reliance on using maestro in production. In our environment alone, maestro has orchestrated millions of pipeline executions over the course of a year, effectively making it the heartbeat of our entire data stack.

If you haven’t heard of maestro, it’s a pipeline orchestration package. You can learn more about it here.

Click through to see what’s changed between the 1.0.0 release and now. H/T R-Bloggers.

Leave a Comment

Zero-Shot Text Classification in Python

Abid Ali Awan doesn’t have time to train:

In this article, you will learn how zero-shot text classification works and how to apply it using a pretrained transformer model.

Topics we will cover include:

  • The core idea behind zero-shot classification and how it reframes labeling as a reasoning task.
  • How to use a pretrained model to classify text without task-specific training data.
  • Practical techniques such as multi-label classification and hypothesis template tuning.

This typically works best when the set of classes is quite distinct and limited in number. Once you get past several classes, the likelihood of spurious results increases considerably and that’s when you’re back to model training/fine-tuning based off of sufficient quantities of labeled data.

Leave a Comment

Using Change Event Streaming for Microsoft Fabric Real-Time Analytics

Xu Jiang and Nikola Zagorac take a look at Change Event Streaming:

Traditionally, Change Data Capture (CDC) has been the go-to mechanism for tracking SQL Server data changes. However, CDC relies on polling-based capture with intermediate change tables, introducing latency and operational overhead, such as managing polling, offsets, and replaying windows in connector. Change Event Streaming (CES), introduced in SQL Server 2025, Azure SQL Database, and Azure SQL Managed Instance, takes a fundamentally different approach: it pushes data change events directly from the database engine to external streaming platforms in real time. Built on the CloudEvents specification, CES delivers structured JSON messages with the operation type and full row data – eliminating intermediate tables and reducing end-to-end latency to near zero.

Click through for more information, though Change Event Streaming is still officially a preview feature in SQL Server 2025

Leave a Comment

Using the Dedicated Admin Connection in SQL Server

Garry Bargsley forces down the door:

It’s 2 AM. Your phone is going off. Users can’t connect to the application, and when you open SSMS to investigate, the connection spinner just keeps spinning. SQL Server is alive; you can see the process running, but it’s too overwhelmed to let you in. You need to get in there and kill something, but you can’t get a connection to do it. This is exactly the scenario the Dedicated Admin Connection DAC was built for. And if you haven’t set it up yet, now is the time. Because when you need it, you really need it.

Because there is a preparatory step, it’s important to run that while the instance is in a healthy state. That way, it’ll be available to you when the instance is at the edge of failure.

Leave a Comment

SQL ConstantCare Report for Spring 2026

Brent Ozar provides an update:

SQL Server 2025’s 1% adoption rate might sound small, but it mirrors the adoption rate curves of 2019 and 2022 when those releases came out. It took 2019 a year to break 10% adoption, and it took 2022 a year and a half. I’ve grouped together 2014 & prior versions because they’re all unsupported, and 2016 will join them quickly in July when it goes out of extended support. (I can’t believe it’s been almost 10 years already!) Here’s how adoption is trending over time, with the most recent data at the right:

Standard statements about how this is a biased (in the statistical sense) sample apply. Standard statements about how I am appreciative that Brent shares this information because I don’t know of anyone else who consistently does give out this level of info also apply.

Leave a Comment