Press "Enter" to skip to content

Curated SQL Posts

Adding Temporal Reasoning to RAG

Ivan Palomares Carrascosa checks the date:

Topics we will cover include:

  • How to extend standard subject-predicate-object triples into time-stamped quadruples stored in a simple temporal graph.
  • How to calculate recency weights with exponential decay and use them to rank conflicting facts as of a given query date.
  • How to tune the half-life parameter and integrate the temporal graph into a deterministic 3-tiered Graph-RAG retrieval pipeline.

This is especially important if you’re searching over the news or other systems that value more recent information over older information.

Leave a Comment

Immutable Backups on SQL Server 2025 in Azure

Warwick Rudd takes us through some steps:

Most people know they need backups. Fewer have thought about what happens when somebody else gets to them first. Ransomware doesn’t start by encrypting your databases. It starts by finding your backups, because once those are gone you have nothing to recover to and every reason to pay. So a backup that anyone with the right credentials can delete is only a partial answer. It protects you from a failed server. It doesn’t protect you from someone who has made their way into your environment.

What you want is a backup that can’t be changed or deleted by anybody until the retention period you set has passed. Not an attacker, not a compromised admin account, and not you on a bad day. SQL Server 2025 makes this a lot more practical. Backup to URL now supports Managed Identity, so you can write backups to immutable Azure Blob Storage without handing out a SAS token or a storage key. There’s no secret sitting in a credential waiting to be found.

Click through for steps to set up the storage account.

Leave a Comment

Against Using a Single Database for Everything

Pat Wright lays out a case:

I’ve seen quite a few posts lately about how PostgreSQL can do everything. And, while I do believe it’s the most advanced and fastest-growing relational database available right now, that doesn’t change the fact that – at its core – it’s still a relational database.  

This thinking goes all the way back to the mid-2000s, when I was working on SQL Server and starting to explore the NoSQL movement with Elasticsearch, Hadoop, Hive, HBase, and their respective tools.

Even back then, people said these new technologies could solve every problem. Take it from me: please don’t use any technology for every problem you have.

Read on for Pat’s argument. Pat has tailored this one specifically for PostgreSQL but you can swap out a few things and have it apply to pretty much anything.

Leave a Comment

Viewing Histogram Data of Sensitive Postgres Databases

Emad Al-Mousa finds a way around:

Adversaries continuously exploit every available vector to exfiltrate sensitive data while evading detection. This risk is magnified because critical threats originate from both external cybercriminals and trusted insiders.

To counter this, robust database auditing acts as a foundational line of defense, enforcing tailored policies that align with corporate security and compliance mandates. By streaming these granular audit logs directly to a SIEM solution, Security Operations Center (SOC) analysts gain real-time visibility to spot anomalous queries and unauthorized modifications. Furthermore, these logs serve as an immutable evidentiary trail for post-incident forensics. Ensuring that the database security and logging engine functions reliably is therefore non-negotiable for enterprise risk mitigation, rapid incident response, and regulatory compliance.

The quick idea is that you can view database histogram data without tripping audit logs, and those histograms might contain some amount of the sensitive data that you don’t want people to see.

Leave a Comment

Data API Builder 2.1.5 Updates

Carlos Robles, et al, announce a new version of Data API Builder:

Data API builder (DAB) 2.1.5 is now available as a stable release, and it is about meeting modern data where it lives: documents next to rows, embeddings next to both. This release brings native support for the SQL json and vector data types to the REST and GraphQL endpoints, so the same entities that serve your CRUD traffic can now store and expose document-shaped data and embeddings without custom code. It also introduces DAB as an embeddable NuGet library, hardens the MCP endpoint, moves the engine to .NET 10, and ships a set of security and reliability improvements.

Click through to see what’s new.

Leave a Comment

What’s New in Python 3.15

Russ Hyde has some new release notes:

It’s October, so that means a new stable release of Python has arrived. Here we will review some of the changes introduced in Python 3.15.

Prominent changes in Python 3.15 that we will cover:

  • profiling & statistical sampling
  • lazy imports
  • unpacking * in for comprehensions

Click through to learn more about what’s out. Though I will say that I’m mostly on 3.13 and sometimes 3.14 because it can take a while for package makers to catch up.

Leave a Comment

Fabric Tenant Settings to Check at Launch

Paul Turley continues a series on Microsoft Fabric:

Article 3 covered the headline settings almost every tenant touches first, but the full tenant settings screen runs past 30 categories, from information protection to advanced networking. You won’t master all of it on day one, but knowing what’s there keeps you from being caught flat-footed later. Skim the full list once, even if you’re not ready to configure most of it, just so nothing surprises you when a business unit asks for a capability you didn’t know existed.

Click through for six tips.

Leave a Comment

A First Look at Microsoft Fabric On-Demand Capacity

Reitse Eskens gives it a try:

You can compare it to Serverless SQL databases: when it’s not in use, it won’t cost anything. Storage will always incur some cost, but no compute.
First, be aware that there are no reservations (reserve plans soon) available. Second, pricing to use items will differ from the regular capacities. Some items may have the same price; others will be calculated at x2 or x3. We have to wait for the official documentation to find out what the actual prices will be.

Right now, we don’t know what the cost will look like, though once the documentation is available, we should have a better idea. Assuming it’s not in some inscrutable units.

Leave a Comment

Query Plan Hints in Postgres 19

Elizabeth Garrett Christensen says you may not need it:

For years the Postgres community was against adding support for hints. They felt if you had correctly analyzed tables, the Postgres query planner would make the right choice. And they’re not wrong, for the most part. Yet many DBAs and developers will tell you of a time when a plan suddenly changed or something was saved by a hint. We can debate the good and bad elements of hints, but the cool thing is that you will soon have a choice in Postgres 19+.

Read on to see how plan hints will work and what you should try before using them.

Leave a Comment

Power BI Projects Now GA

John Kerski takes note:

Do you know where you were on June 15, 2023? Do not fret, neither do I. But I do remember a blog post written by Rui Romano announcing the preview of the Power BI Project (PBIP) format back then.

Many in the Power BI world rejoiced at this news. Microsoft was finally taking steps toward better practices seen in software development and applying them to the analytics space.

As it happens, June 15, 2023 was just the first step. Since then, PBIP has evolved into the format we have today and I am happy to see that, as of September 2026, PBIP is generally available as a fully-supported feature for Power BI by Microsoft.

Before I explain the mechanics of PBIP, let me outline the real problems it was designed to solve.

Not included in John’s article: “Power BI Report Server.” Because Power BI Report Server users learn early on not to attempt to rise above their station.

Leave a Comment