cd /news/ai-infrastructure/the-hidden-index-part-1-the-table-yo… · home › topics › ai-infrastructure › article
[ARTICLE · art-180723] src=infino.ai ↗ pub= topic=ai-infrastructure verified=true sentiment=· neutral

The hidden index, part 1: the table you write and the index you don’t

Infino's engineering blog detailed how its vector search engine handles new rows on S3 object storage, where files can only be added and never edited, so a committed write becomes a new Parquet "superfile" containing a keyword index and a small k-means-clustered vector index, with a manifest pointer swap as the only atomic step. Because files stay in write order, queries must scan every file, so Infino maintains a hidden second table that reorders the same vectors spatially, dividing a 10-million-row table into 256 cells. The post, the first in a two-part series, argues the approach removes indexing lag at the cost of query cost that grows with the number of commits.

recommendation

If your vector index lives on object storage, append-only superfiles with a manifest pointer swap eliminate indexing lag, but add a hidden spatially clustered table so queries don't scan every file.

more in playbook: Retrieval and RAG
by read9 min views5 publishedDec 3, 2026
The hidden index, part 1: the table you write and the index you don’t
Image: Infino (auto-discovered)

In the last post I asked Claude for something spicy and noodle based, and the whole thing was about how a search box gets from “spicy noodles” to a bowl called Korean Ramyun. I stopped at the point where the dish is already sitting in an index, waiting to be found. That skips the part I actually spend my days on.

Say that Korean place adds a new bowl to the menu at 7pm tonight. Somebody types it into a restaurant dashboard and it becomes one row in a table, with a name, a price and an embedding. How soon can my agent find it? And what has to happen behind the scenes so that the search is still fast after ten million other dishes have been added the same way?

To be clear, I don’t know how Uber Eats does this internally. This post is about what happens if that menu lives in Infino, because the optimizer is the part of the engine most of my time goes into.

Why you can’t just add it to the index #

Most vector indexes are built to be edited. HNSW, the graph one from the last post, adds a new vector by wiring it to its neighbours, which means going back and changing nodes that are already in the graph. That’s fine when the index sits in memory on a machine you own.

Ours sits inside Parquet files on S3. Object storage gives you two operations that matter here: you can write a whole new object, or you can read a piece of an existing one. There is no “change these 40 bytes in the middle of the file”. So everything in this post comes from one rule we had to accept early: we only ever add files, we never edit one.

What happens when you write #

From your side it’s one line.

dishes.append(rows)

When that write commits, the engine builds the rows into one file. We call it a superfile, but it’s a regular Parquet file that any Parquet reader can open, with a keyword index and a vector index tucked inside it. The vector index in there is a small one. It runs k-means over just the rows in that file and groups them into clusters.

Then the table has to learn that the file exists. A table in Infino is a list of files, called the manifest, plus one tiny pointer that says which manifest is the current one. A commit uploads the new file, writes a new manifest that lists the old files plus the new one, and then swaps the pointer. That swap is the only atomic step in the whole thing. A reader that started before the swap keeps the old manifest and finishes on it. A reader that starts after it sees the new dish. Nobody waits on anybody.

So the answer to “how soon” is: as soon as the commit returns. There is no indexing lag before the row can be found.

The problem with stopping there #

The files in your table are in the order you wrote them.

your table, ordered by time

  file 001    monday's dishes     its own small clusters
  file 002    tuesday's dishes    its own small clusters
  ...
  file 900    tonight's dishes    its own small clusters

Every file holds a bit of everything. The noodle dishes are spread across all 900 of them, because restaurants don’t add their menus sorted by cuisine. So a query for “spicy noodles” has to look inside every single file, since any of them could be holding the closest match. On S3 each of those looks is a network request.

It works, and the results are correct. But the cost of a query now grows with how many times you committed, and that is a terrible thing for it to grow with.

The table you don’t write #

Next to your table, the engine keeps a second one. You never create it, it doesn’t show up when you list your tables, and you never query it by name. It holds the same vectors, arranged by where they sit in space instead of when they arrived.

Space gets cut into cells. A cell is a neighbourhood: one centre point, and every vector that is closer to that centre than to any other. The 10 million row table I’ll quote numbers from below had 256 of them. The centres are stored in the manifest itself, which turns out to matter a lot in a second.

Moving rows from the first table into the second is what optimize() does, in a step we call the drain. For every new vector it finds the nearest cell centre. Since the centres are already in the manifest, and the manifest is already in memory, this costs zero reads from S3. Then for every cell that received rows, it writes one small new file holding just those rows. The files that cell already had are not touched. Then it publishes a new manifest for the hidden table with the same pointer swap as before.

So tonight’s ramyun lands in the noodle cell as a small file, sitting beside the big one that was already there.

Two things follow from that, and both are solved without editing anything.

Small files pile up inside a cell. Compaction merges them into one packed file, swaps it in, and the old ones get deleted later by garbage collection.

A cell also grows. Noodles are popular. When one gets too big, it’s split: the children are written out as a new file, and the parent is marked as superseded in the manifest. Readers skip a superseded cell from that moment on, and its bytes are reclaimed later.

If you’ve worked with MVCC in Postgres or with an LSM tree, the shape will feel familiar. New versions get written beside the old ones, there’s one atomic switch, and the cleanup happens afterwards.

What a query sees #

A query looks in two places. It reads the hidden index for every row that has been drained, and it reads the handful of files committed since the last optimize() the slower way, file by file. Then it merges the two.

That means the new dish is never invisible. The only thing that changes is whether it’s found on the cheap path or the slow one.

How different are the two paths? These are from the pull request that introduced this design (#422): 10 million vectors of 1024 dimensions, 256 cells, on a 4 core machine reading from Azure blob storage.

rows still in your table rows in the hidden index
recall@10 0.997 0.996
warm p50 latency 11.92 ms 2.35 ms
one cold query 16 requests, 56 MiB 3 requests, 22.5 MiB

Same data, same recall, about 5x faster once it’s warm.

The cold numbers need a caveat. Five times fewer requests and less than half the bytes only moved the cold wall clock from about 243 ms to 200 ms. That’s because the engine sends those requests in parallel, so the wait is roughly one round trip to blob storage whether it’s 3 requests or 16. This table had also been loaded in only a handful of commits, so “every file” was just 16 files. The request count on the left grows with every commit you make and the one on the right doesn’t, which is where it starts to matter, at 100 million rows and beyond.

Why it’s hidden #

We could have exposed this as an index you create and tune yourself, the way you’d write CREATE INDEX and then pick the number of lists and probes. We kept it hidden because every one of those settings is something the engine can measure better than a person can guess: how many cells there should be, how many of them a query needs to read, when one should split. You give it one number, the recall you want, and optimize() checks itself against exact answers and sizes the rest. That gets its own post later in the series.

What it costs #

None of this is free, and this is the part that hurt the most. To see why, here is everything one optimize() call does, in order:

  1. Drain. New vectors are assigned to cells and written as small files, as above.
  2. Merge. Each cell’s small files are compacted into one.
  3. Split. Cells that have grown too big are divided.
  4. Recalibrate. The engine replays a sample of queries to re-measure how many cells a query has to read to hit the recall you asked for.
  5. Clean up. Files that were replaced get garbage collected.

The drain only looks at new rows. The other stages look at cells, and every new batch lands a few rows in almost every cell. So the work grows with the whole table, not with what you just added.

We first measured this in September, while building toward a billion vectors by adding 50 million at a time and optimizing after each batch on a 16 vCPU machine (issue #783). The optimize() at 50 million rows took 1,450 seconds. The one at 450 million took 16,836 seconds, which is 4.7 hours, and by then about 90% of the wall clock was going into optimize and not into data. When we timed each stage at a billion rows, split alone was 97% of it.

That number is history now. Four fixes went in over the next six weeks: a faster way to assign rows to cells during the drain (#790), a cheaper recalibration (#792), a way to skip recalibration between batches (#793), and the big one, freezing the grid on tables from 10 million rows up that are routed through a graph over the cluster centres, so they never split or recalibrate at all (#1048, and a later post). Today a single optimize() on an incremental build finishes in under an hour, where it used to take almost five. On a recent billion row build, all the optimize calls together added up to 6,719 seconds (PR #1511, and that run was on a 32 vCPU machine, so it isn’t the same hardware).

It isn’t finished. Smaller tables still split, and the drain still writes the whole new batch to local disk before up it, which is why the issue is still open.

Next #

The next post opens up one of those cell files. A 1024 dimension vector takes 4 KB as floats, and we find the right ramyun while storing it at one bit per dimension for the first pass. I want to show why that works and what each extra bit buys you when every byte has to come off S3.

The engine is open source at github.com/infino-ai/infino. If you want to read the code for this post, the comment at the top of src/supertable/opann.rs describes the drain, the merge and the split in about twenty lines, and it’s a better summary than most of what I wrote here.

── more in #ai-infrastructure 4 stories · sorted by recency
── more on @infino 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/the-hidden-index-par…] indexed:0 read:9min 2026-12-03 · —