Press "Enter" to skip to content

Day: May 29, 2026

Next Token Selection in Language Models

Ivan Palomares Carrascosa explains how three knobs shape the outputs of a language model:

In this article, you will learn how logits, temperature, and top-p sampling work together to control next-token prediction in large language models.

Topics we will cover include:

  • What logits are and how they are produced by a transformer’s final linear layer.
  • How temperature and top-p (nucleus sampling) shape the probability distribution used for token selection.
  • How these three components fit into a sequential pipeline that governs LLM output generation.

Click through for that explanation.

Leave a Comment

Filtered Indexes in SQL Server

Erik Darling has a new video:

Now, you just can’t talk about indexing in SQL Server really without talking about filtered indexes. They are a very, very important thing. Conceptually, they are just not that hard to figure out.

It’s an index with a where clause. It only indexes some of the data. It qualifies for the where clause. I don’t know. Like the benefits of that just seem rather apparent to me.

Benjamin Franklin highly encourages you to watch this video, even though filtered indexes are one of the most frustrating things in SQL Server. There are so many cases where I think they should work, and they actually work in approximately a third of those cases.

Leave a Comment

Tips for a Terabyte-Sized Database

Brent Ozar recommends some actions:

You were minding your own business, and all of a sudden it happened.

You glanced at file sizes one day, and your eyes got big. The numbers got a little large while you weren’t looking. This is a great time to stop and think about a few changes to the way you’re managing this database.

These are some good recommendations on the whole. 1TB isn’t a magic number, but it’s a pretty decent dividing line.

Leave a Comment

Automatic Index Compaction in Azure SQL

Chad Callihan takes a look at a preview feature:

There isn’t one set way to manage indexes. Maybe you use Ola Hallengren scripts. Maybe it’s something you put together yourself. Either way, there might be a big shift coming for SQL Server database administrators and how index management is handled.

Last month, Microsoft announced Automatic Index Compaction, which is in preview for Azure SQL Database, Azure SQL Managed Instance, and SQL Database in Fabric. Instead of utilizing something like Ola Hallengren scripts or your own homegrown setup to monitor and rebuild indexes, the database engine will continuously run in the background and handle indexes for you, hence the “automatic” in the name.

Read on to see how it works, as well as a note around page density and index fragmentation. But Jeff Moden makes a good point in the comments, so check that out.

Leave a Comment

Polymorphic Associations in Postgres

Andrei Lepikhov has multiple types:

Planning such a query efficiently is no easy task — and in my experience, this is confirmed by user reports from the 1C world, since PostgreSQL is currently not rich in LEFT JOIN optimisations. At the same time, the properties of this pattern enable the development of various techniques to improve execution efficiency. I’ve managed to implement several straightforward optimisations of this template. But first, let’s understand what polymorphic references actually are, where they come from, and how common they really are. That’s the gap I’m trying to fill with this post.

Click through for the explanation. This isn’t the easiest problem to solve in the relational world, though I do tend to prefer the subclass/superclass solution, myself.

Leave a Comment