# Text, Filters, and Now Vectors in One Postgres Index

> We added vectors to the ParadeDB index and tested filtered queries against Turbopuffer and other Postgres vector extensions.

Published: 2026-11-19 · Author: Ming Ying, Ruchir Raj, Walter Woodall

Source: https://www.paradedb.com/blog/filter-aware-vector-search

---

The explosion in `pgvector` use has shown how valuable vectors are alongside the relational data they represent. But once you move past toy examples and benchmarks, most heavy users of Postgres vector indexes will struggle to scale in production because:

- **Filtering**: Complex `WHERE` clauses can slow queries dramatically or reduce recall.
- **Memory**: Large datasets demand more memory to build and search.
- **Continuous updates**: Heavy writes add maintenance work to preserve recall and performance.

Today we're announcing native vector support in ParadeDB. Following in the footsteps of search engines, vectors live in the same index that powers text search, addressing filtering and memory together. Support for continuous updates is still in development.

Rather than compare against just Postgres vector extensions, we decided to raise the bar and benchmark against a dedicated search engine.
Here's how we compare with Turbopuffer on vector search over the 28 million-row Hacker News dataset[^filtered-dataset], with a 0.01% selectivity text filter:

### Filtered vector search: ParadeDB and Turbopuffer

| Engine      | QPS   | Measured recall |
| ----------- | ----- | --------------- |
| ParadeDB    | 90.32 | 100%            |
| Turbopuffer | 23.28 | 99.1%           |

Hacker News, top 10, text filter matching 0.01% of rows. Warm runs with one concurrent client. Turbopuffer runs on separate cloud hardware and includes network latency.

In the following sections, we'll first share some more performance results. Then, we'll do a deep dive into our architecture and roadmap.

## Why We Benchmarked Against Turbopuffer

To keep search in Postgres, we need to be competitive with dedicated search engines. Being faster than another Postgres vector index matters less if an external vector database performs significantly better. We benchmark against Turbopuffer, which we consider to be one of the most popular vector databases, to test that.

ParadeDB excels at both unfiltered and filtered vector search. For unfiltered search we use the 113 million
MS Marco dataset. Here ParadeDB delivers 1.7× Turbopuffer's throughput for top-10 search, at 95.2% versus 94% measured recall[^turbopuffer-methodology].

### Turbopuffer and ParadeDB: unfiltered search

| Dataset  | Workload              | Engine              | Measured recall | QPS    | p50 (ms) | p95 (ms) |
| -------- | --------------------- | ------------------- | --------------- | ------ | -------- | -------- |
| MS MARCO | knn_top10_unfiltered  | Turbopuffer         | 94%             | 56.98  | 16.23    | 23.037   |
| MS MARCO | knn_top10_unfiltered  | ParadeDB (below TP) | 90.1%           | 257.92 | 3.642    | 5.119    |
| MS MARCO | knn_top10_unfiltered  | ParadeDB (above TP) | 95.2%           | 96.32  | 8.178    | 20.538   |
| MS MARCO | knn_top100_unfiltered | Turbopuffer         | 92%             | 51.36  | 17.873   | 25.178   |
| MS MARCO | knn_top100_unfiltered | ParadeDB (below TP) | 90.02%          | 142.18 | 6.791    | 8.894    |
| MS MARCO | knn_top100_unfiltered | ParadeDB (above TP) | 95%             | 51.42  | 21.498   | 29.016   |

Nearest measured ParadeDB recall below and above Turbopuffer where available. One concurrent client, 50 seconds measured after warmup. Turbopuffer uses separate cloud hardware and includes network latency.

Before we continue, we'd like to note that an apples-to-apples comparison was not fully possible for a few reasons:

1. **Different Recalls**: ParadeDB exposes a query-time knob to tune recall[^recall], but Turbopuffer does not. Queries are faster at lower recall, so comparisons of different vector engines should be done at equal recall. For most of these comparisons, the recalls of ParadeDB and Turbopuffer
   differ slightly and are shown in the graphs.
2. **Different Hardware**: Postgres benchmarks were run on AWS EC2 `c8gd.metal-24xl` instances with local NVMe SSD storage, with each database running in a Docker container limited to 8 CPUs and 32 GiB of RAM[^msmarco-vectorchord]. Aside from its use of [NVMe SSDs for caching](https://turbopuffer.com/docs/architecture), Turbopuffer's exact hardware configuration and the CPU and memory resources allocated are unknown to us.
3. **Network Latency**: Because Turbopuffer runs on their cloud (we do not have access to their BYOC), they are disadvantaged in our benchmarks by sub-1ms network latency.

For these reasons we are not claiming to be faster than Turbopuffer, even if it appears that way in the results. Instead, we are including Turbopuffer to demonstrate that you can expect comparable vector search performance between the two databases, running ParadeDB on a modest 8 CPUs and 32GB RAM. This is not the case for any other Postgres vector extension. As you will see below, in some filtered cases they are hundreds of times slower and miss ranges of recall targets.

Our results are reproducible with [benchmarker](https://github.com/paradedb/benchmarker) and we welcome verification.

## What Happens When We Add Filters?

On the 28M Hacker News dataset, we tested top-10 searches with date range and text filters. For instance, a ParadeDB vector search with a date range filter looks like:

```sql
SELECT id FROM hn_items
WHERE id @@@ pdb.all()
  AND time >= '2021-09-09T06:23:25+00:00'::timestamptz
ORDER BY emb <=> '[...]'::vector(1536)
LIMIT 10;
```

A text filter looks like:

```sql
SELECT id FROM hn_items
WHERE id @@@ pdb.all()
  AND "by" = 'rossdavidh'
ORDER BY emb <=> '[...]'::vector(1536)
LIMIT 10;
```

In our benchmarks, ParadeDB is competitive with Turbopuffer at lower selectivities and races ahead at higher selectivities. For instance, with text filters matching 0.01% and 0.001% of the dataset, ParadeDB delivers 3.9× and 5.6× Turbopuffer's throughput, respectively, at 100% measured recall.

### Turbopuffer and ParadeDB: filtered search

| Dataset     | Workload             | Engine              | Measured recall | QPS    | p50 (ms) | p95 (ms) |
| ----------- | -------------------- | ------------------- | --------------- | ------ | -------- | -------- |
| Hacker News | range_10pct          | Turbopuffer         | 94.2%           | 47.8   | 19.132   | 24.219   |
| Hacker News | range_10pct          | ParadeDB (below TP) | 90.1%           | 71.98  | 13.544   | 18.224   |
| Hacker News | range_10pct          | ParadeDB (above TP) | 95%             | 48     | 20.525   | 27.007   |
| Hacker News | range_1pct           | Turbopuffer         | 88.4%           | 49.52  | 18.45    | 25.487   |
| Hacker News | range_1pct           | No lower recall run | —               | —      | —        | —        |
| Hacker News | range_1pct           | ParadeDB (above TP) | 90.1%           | 28.08  | 34.633   | 55.795   |
| Hacker News | range_0.1pct         | Turbopuffer         | 98.8%           | 16.62  | 59.273   | 62.372   |
| Hacker News | range_0.1pct         | ParadeDB (below TP) | 95%             | 27.86  | 34.955   | 41.673   |
| Hacker News | range_0.1pct         | ParadeDB (above TP) | 99%             | 16     | 62.043   | 74.463   |
| Hacker News | single_term_0.1pct   | Turbopuffer         | 97.9%           | 22.58  | 43.425   | 46.186   |
| Hacker News | single_term_0.1pct   | ParadeDB (below TP) | 95.8%           | 29.28  | 34.097   | 36.828   |
| Hacker News | single_term_0.1pct   | ParadeDB (above TP) | 99%             | 15.3   | 65.273   | 69.298   |
| Hacker News | single_term_0.01pct  | Turbopuffer         | 99.1%           | 23.28  | 41.917   | 44.702   |
| Hacker News | single_term_0.01pct  | No lower recall run | —               | —      | —        | —        |
| Hacker News | single_term_0.01pct  | ParadeDB (above TP) | 100%            | 89.74  | 11.041   | 11.279   |
| Hacker News | single_term_0.001pct | Turbopuffer         | 99.4%           | 47.12  | 19.788   | 23.947   |
| Hacker News | single_term_0.001pct | No lower recall run | —               | —      | —        | —        |
| Hacker News | single_term_0.001pct | ParadeDB (above TP) | 100%            | 265.66 | 3.722    | 3.762    |

Nearest measured ParadeDB recall below and above Turbopuffer where available. One concurrent client, 50 seconds measured after warmup. Turbopuffer uses separate cloud hardware and includes network latency.

## How We Built It: A Filter-Aware Index

The ParadeDB index was already [filter-aware](https://www.paradedb.com/docs/reference/filtering/overview) for text search and facets.

The tricky part about extending that ability to vectors is that more selective filters require deeper, more expensive probing into the vector index where large amounts of work could get thrown away. With `pgvector` and every other vector extension, [filters are applied after vector candidates are found](https://github.com/pgvector/pgvector#filtering). This means that, under a 1% selectivity filter, only 1 out of 100 vectors read and scored could actually make it into the result set. The rest is wasted work.

ParadeDB avoids that wasted work because vectors and filterable fields share an index. For the Hacker News queries above, vectors are indexed alongside the fields that support text search and range filtering:

```sql
CREATE INDEX hn_search_idx ON hn_items
USING paradedb (
  id,
  title,
  ("by"::pdb.literal),
  time,
  emb vector_cosine_ops
);
```

Before doing any vector-related work, ParadeDB first evaluates the filter(s) into a bitset of matching document identifiers. During vector search, the index checks each candidate's identifier against the bitset before it loads or scores the vector. Candidates that fail the filter incur only a fast bitset check instead of an expensive vector calculation.

To see just how efficient ParadeDB is at evaluating filters, the following graph compares throughput over the Cohere 10M dataset at three different selectivities: 1%, 10%, and unfiltered. Notice how, for a given recall target, the filtered queries are similarly as fast as the unfiltered queries.

### Cohere 10M filtered and unfiltered vector search

| Workload                      | Recall target | Achieved recall | QPS    | p50 (ms) | p95 (ms) | p99 (ms) | Completions |
| ----------------------------- | ------------- | --------------- | ------ | -------- | -------- | -------- | ----------- |
| Unfiltered                    | 90%           | 90.4%           | 263.62 | 3.692    | 4.468    | 4.8      | 13181       |
| Text filter, ~10% selectivity | 90%           | 90.2%           | 124.02 | 8.028    | 9.091    | 9.572    | 6201        |
| Text filter, ~1% selectivity  | 90%           | 90.9%           | 156.82 | 6.325    | 7.903    | 8.485    | 7841        |
| Unfiltered                    | 95%           | 95.0%           | 154.36 | 6.439    | 7.823    | 8.337    | 7718        |
| Text filter, ~10% selectivity | 95%           | 95.1%           | 93.5   | 10.7     | 12.348   | 13.081   | 4675        |
| Text filter, ~1% selectivity  | 95%           | 95.1%           | 101.32 | 9.688    | 12.305   | 12.897   | 5066        |
| Unfiltered                    | 99%           | 99.0%           | 72.9   | 15.303   | 17.695   | 18.596   | 3645        |
| Text filter, ~10% selectivity | 99%           | 99.0%           | 48.68  | 20.618   | 24.267   | 24.98    | 2434        |
| Text filter, ~1% selectivity  | 99%           | 99.1%           | 32.02  | 30.556   | 38.719   | 40.402   | 1601        |

10M 1,024-dimensional vectors; one concurrent client; 10-second warmup followed by a fixed 50-second completion window. Each workload is tuned independently to the selected recall target, measured over 100 query vectors. All targets were reached. [Source k6 run](https://github.com/paradedb/paradedb/actions/runs/44474001296).

This is not the case with any other Postgres extension because of a fundamental architectural difference: they require separate indexes for vectors and other fields. We discussed in a <a href="/blog/opening-a-closed-tin-part-2#now-for-the-rest-of-search" target="_blank" rel="noopener noreferrer">previous blog post</a> how performance-critical it is for filters to be indexed alongside text. The same is true for vectors.

Here is the same filtered-versus-unfiltered comparison for `vectorchord` and `pg_vectorsearch`. At the 95% recall target, applying a 1% filter reduces `vectorchord`'s throughput by 70× and `pg_vectorsearch`'s by an estimated 92×.

### vectorchord: filtered and unfiltered search on Cohere 10M

| Workload   | Recall target | Achieved recall | Status  | Measurement              | QPS    | p50 (ms) | p95 (ms) |
| ---------- | ------------- | --------------- | ------- | ------------------------ | ------ | -------- | -------- |
| Unfiltered | 90%           | 90.6%           | Reached | 50-second throughput run | 259.64 | 3.821    | 4.375    |
| Unfiltered | 95%           | 95%             | Reached | 50-second throughput run | 117.92 | 8.451    | 9.308    |
| Unfiltered | 99%           | 99%             | Reached | 50-second throughput run | 44.22  | 22.469   | 24.841   |
| Text 10%   | 90%           | 90.3%           | Reached | 50-second throughput run | 42.3   | 15.748   | 64.678   |
| Text 10%   | 95%           | 95.1%           | Reached | 50-second throughput run | 26.16  | 30.184   | 78.279   |
| Text 10%   | 99%           | 99.3%           | Reached | 50-second throughput run | 6.16   | 150.234  | 267.514  |
| Text 1%    | 90%           | 90.7%           | Reached | 50-second throughput run | 1.76   | 226.645  | 2644.317 |
| Text 1%    | 95%           | 96.2%           | Reached | 50-second throughput run | 1.68   | 207.758  | 2352.4   |
| Text 1%    | 99%           | 99%             | Reached | 50-second throughput run | 1.36   | 272.222  | 4209.276 |

10M 1,024-dimensional vectors; top 10; one concurrent client; 10-second warmup followed by 50 seconds measured. Estimated QPS comes from average query time when a recall target was missed. The faster pre/post-filter run reaching each target is shown. [vectorchord source run](https://github.com/paradedb/paradedb/actions/runs/44474004837), [vectorchord-prefilter source run](https://github.com/paradedb/paradedb/actions/runs/44474008558)

### pg_vectorsearch: filtered and unfiltered search on Cohere 10M

| Workload   | Recall target | Achieved recall | Status        | Measurement              | QPS                | p50 (ms)   | p95 (ms)   |
| ---------- | ------------- | --------------- | ------------- | ------------------------ | ------------------ | ---------- | ---------- |
| Unfiltered | 90%           | 92%             | Reached       | 50-second throughput run | 227.44             | 4.255      | 5.921      |
| Unfiltered | 95%           | 95.7%           | Reached       | 50-second throughput run | 147.3              | 6.723      | 9.001      |
| Unfiltered | 99%           | 99.1%           | Reached       | 50-second throughput run | 53.8               | 18.57      | 26.874     |
| Text 10%   | 90%           | 90.6%           | Reached       | 50-second throughput run | 4.88               | 211.246    | 264.575    |
| Text 10%   | 95%           | 96.4%           | Reached       | 50-second throughput run | 3.7                | 280.194    | 339.184    |
| Text 10%   | 99%           | 99.4%           | Reached       | 50-second throughput run | 2.84               | 362.359    | 443.297    |
| Text 1%    | 90%           | 75.5%           | Recall missed | Estimated QPS            | 1.6015898877495143 | 632.840645 | 822.810063 |
| Text 1%    | 95%           | 75.5%           | Recall missed | Estimated QPS            | 1.6015898877495143 | 632.840645 | 822.810063 |
| Text 1%    | 99%           | 75.5%           | Recall missed | Estimated QPS            | 1.6015898877495143 | 632.840645 | 822.810063 |

10M 1,024-dimensional vectors; top 10; one concurrent client; 10-second warmup followed by 50 seconds measured. Estimated QPS comes from average query time when a recall target was missed. [pg_vectorsearch source run](https://github.com/paradedb/paradedb/actions/runs/44474012182)

## How We Compare with Other Postgres Vector Extensions

We chose `pg_vectorsearch` and `vectorchord` as our Postgres baselines because both have pushed vector search performance beyond `pgvector`. Here's how they compare with ParadeDB on the filtered Hacker News query from the introduction[^vectorchord-mode][^missed-recall]:

### Filtered vector search: Postgres extensions

| Engine          | QPS   | Measured recall                                |
| --------------- | ----- | ---------------------------------------------- |
| ParadeDB        | 90.32 | 100%                                           |
| vectorchord     | 0.12  | 99.2%                                          |
| pg_vectorsearch | 0.01  | 78% (did not reach 99% recall) (estimated QPS) |

Hacker News, top 10, text filter matching 0.01% of rows. Warm runs with one concurrent client. The comparison targets 99% recall. Below-target bars show estimated QPS from average query time, with the measured recall flagged.

Additionally, we tested six filters matching from 10% down to 0.001% of rows at three recall targets. Only ParadeDB reached all 18 recall targets. `vectorchord` reached 16, while `pg_vectorsearch` reached three.

Generally speaking, the more selective the filters become, the worse the other Postgres extensions perform. For example, `pg_vectorsearch`'s highest achieved recall on the 0.001% text filter was 16.4%, at near-zero estimated throughput.

### Hacker News filtered vector search

| Workload    | Recall target | Engine          | Target status                   | Measured recall (%) | Measurement                | QPS                  | p50 (ms)           | p95 (ms)          | p99 (ms)           | Queries |
| ----------- | ------------- | --------------- | ------------------------------- | ------------------- | -------------------------- | -------------------- | ------------------ | ----------------- | ------------------ | ------- |
| Range 10%   | ~90%          | pg_search       | Reached                         | 90.1                | 50-second throughput run   | 71.98                | 13.544             | 18.224            | 20.344             | 3599    |
| Range 10%   | ~90%          | pg_vectorsearch | Reached                         | 90.1                | 50-second throughput run   | 50.46                | 16.348             | 19.942            | 209.429            | 2523    |
| Range 10%   | ~90%          | vectorchord     | Reached                         | 90.3                | 50-second throughput run   | 107.34               | 9.365              | 10.714            | 11.04              | 5367    |
| Range 10%   | ~95%          | pg_search       | Reached                         | 95                  | 50-second throughput run   | 48                   | 20.525             | 27.007            | 29.357             | 2400    |
| Range 10%   | ~95%          | pg_vectorsearch | Reached                         | 95.7                | 50-second throughput run   | 24.98                | 37.643             | 52.125            | 94.415             | 1249    |
| Range 10%   | ~95%          | vectorchord     | Reached                         | 95.5                | 50-second throughput run   | 41.88                | 24.063             | 27.128            | 30.349             | 2094    |
| Range 10%   | ~99%          | pg_search       | Reached                         | 99                  | 50-second throughput run   | 16.08                | 61.346             | 75.924            | 84.256             | 804     |
| Range 10%   | ~99%          | pg_vectorsearch | MISSED                          | 96.9                | Estimated from 100 queries | 1.0809254289995587   | 927.7279000000001  | 1178.636681       | 1269.202503        | 100     |
| Range 10%   | ~99%          | vectorchord     | Reached                         | 99                  | 50-second throughput run   | 11.76                | 84.57              | 97.433            | 100.873            | 588     |
| Range 1%    | ~90%          | pg_search       | Reached                         | 90.1                | 50-second throughput run   | 28.08                | 34.633             | 55.795            | 60.075             | 1404    |
| Range 1%    | ~90%          | pg_vectorsearch | Reached                         | 90.1                | 50-second throughput run   | 0.64                 | 1528.439           | 2076.44           | 2081.535           | 32      |
| Range 1%    | ~90%          | vectorchord     | Reached                         | 90.2                | 50-second throughput run   | 47.4                 | 19.876             | 28.029            | 35.489             | 2370    |
| Range 1%    | ~95%          | pg_search       | Reached                         | 95                  | 50-second throughput run   | 20.9                 | 46.724             | 72.021            | 76.054             | 1045    |
| Range 1%    | ~95%          | pg_vectorsearch | MISSED                          | 94.9                | Estimated from 100 queries | 0.26291590721674457  | 3808.098011        | 5396.286101000001 | 5561.394533        | 100     |
| Range 1%    | ~95%          | vectorchord     | Reached                         | 95.6                | 50-second throughput run   | 7.26                 | 127.615            | 231.718           | 292.796            | 363     |
| Range 1%    | ~99%          | pg_search       | Reached                         | 99                  | 50-second throughput run   | 5.32                 | 181.075            | 250.463           | 264.746            | 266     |
| Range 1%    | ~99%          | pg_vectorsearch | MISSED                          | 94.9                | Estimated from 100 queries | 0.26291590721674457  | 3808.098011        | 5396.286101000001 | 5561.394533        | 100     |
| Range 1%    | ~99%          | vectorchord     | Reached                         | 99.7                | 50-second throughput run   | 1.14                 | 848.488            | 976.464           | 999.125            | 57      |
| Range 0.1%  | ~90%          | pg_search       | Reached                         | 90.4                | 50-second throughput run   | 30.1                 | 32.201             | 39.362            | 47.388             | 1505    |
| Range 0.1%  | ~90%          | pg_vectorsearch | MISSED                          | 85.9                | Estimated from 100 queries | 0.04426803217148496  | 21418.352062       | 37661.381008      | 38195.256416       | 100     |
| Range 0.1%  | ~90%          | vectorchord     | Reached                         | 90                  | 50-second throughput run   | 1.06                 | 976.258            | 1302.44           | 1528.529           | 53      |
| Range 0.1%  | ~95%          | pg_search       | Reached                         | 95                  | 50-second throughput run   | 27.86                | 34.955             | 41.673            | 48.219             | 1393    |
| Range 0.1%  | ~95%          | pg_vectorsearch | MISSED                          | 85.9                | Estimated from 100 queries | 0.04426803217148496  | 21418.352062       | 37661.381008      | 38195.256416       | 100     |
| Range 0.1%  | ~95%          | vectorchord     | Reached                         | 95.3                | 50-second throughput run   | 0.9                  | 1131.073           | 1568.878          | 1718.365           | 45      |
| Range 0.1%  | ~99%          | pg_search       | Reached                         | 99                  | 50-second throughput run   | 16                   | 62.043             | 74.463            | 81.332             | 800     |
| Range 0.1%  | ~99%          | pg_vectorsearch | MISSED                          | 85.9                | Estimated from 100 queries | 0.04426803217148496  | 21418.352062       | 37661.381008      | 38195.256416       | 100     |
| Range 0.1%  | ~99%          | vectorchord     | Reached                         | 99.1                | 50-second throughput run   | 0.44                 | 2194.474           | 2744.266          | 2835.851           | 22      |
| Text 0.1%   | ~90%          | pg_search       | Reached                         | 90.5                | 50-second throughput run   | 43.86                | 22.877             | 25.632            | 26.2               | 2193    |
| Text 0.1%   | ~90%          | pg_vectorsearch | MISSED                          | 63.9                | Estimated from 100 queries | 0.04136567943305377  | 23168.904966       | 41167.323026      | 41706.505802       | 100     |
| Text 0.1%   | ~90%          | vectorchord     | Reached                         | 93                  | 50-second throughput run   | 0.54                 | 1740.66            | 2891.217          | 4857.071           | 27      |
| Text 0.1%   | ~95%          | pg_search       | Reached                         | 95.8                | 50-second throughput run   | 29.28                | 34.097             | 36.828            | 37.958             | 1464    |
| Text 0.1%   | ~95%          | pg_vectorsearch | MISSED                          | 63.9                | Estimated from 100 queries | 0.04136567943305377  | 23168.904966       | 41167.323026      | 41706.505802       | 100     |
| Text 0.1%   | ~95%          | vectorchord     | Reached                         | 96.3                | 50-second throughput run   | 0.48                 | 1822.342           | 3122.864          | 5133.573           | 24      |
| Text 0.1%   | ~99%          | pg_search       | Reached                         | 99                  | 50-second throughput run   | 15.3                 | 65.273             | 69.298            | 70.302             | 765     |
| Text 0.1%   | ~99%          | pg_vectorsearch | MISSED                          | 63.9                | Estimated from 100 queries | 0.04136567943305377  | 23168.904966       | 41167.323026      | 41706.505802       | 100     |
| Text 0.1%   | ~99%          | vectorchord     | Reached                         | 99.5                | 50-second throughput run   | 0.3                  | 3138.479           | 4505.536          | 4505.536           | 15      |
| Text 0.01%  | ~90%          | pg_search       | Reached                         | 100                 | 50-second throughput run   | 89.74                | 11.041             | 11.279            | 12.084             | 4487    |
| Text 0.01%  | ~90%          | pg_vectorsearch | MISSED (sweep budget exhausted) | 78                  | Estimated from 25 queries  | 0.009366406113976183 | 106907.749142      | 124770.930268     | 129357.298969      | 25      |
| Text 0.01%  | ~90%          | vectorchord     | Reached                         | 90.2                | 50-second throughput run   | 0.18                 | 4949.86            | 6345.976          | 6345.976           | 9       |
| Text 0.01%  | ~95%          | pg_search       | Reached                         | 100                 | 50-second throughput run   | 90.4                 | 10.955             | 11.208            | 12.04              | 4520    |
| Text 0.01%  | ~95%          | pg_vectorsearch | MISSED (sweep budget exhausted) | 78                  | Estimated from 25 queries  | 0.009366406113976183 | 106907.749142      | 124770.930268     | 129357.298969      | 25      |
| Text 0.01%  | ~95%          | vectorchord     | Reached                         | 95.6                | 50-second throughput run   | 0.14                 | 5420.482           | 10686.683         | 10686.683          | 7       |
| Text 0.01%  | ~99%          | pg_search       | Reached                         | 100                 | 50-second throughput run   | 90.32                | 10.969             | 11.201            | 12.061             | 4516    |
| Text 0.01%  | ~99%          | pg_vectorsearch | MISSED (sweep budget exhausted) | 78                  | Estimated from 25 queries  | 0.009366406113976183 | 106907.749142      | 124770.930268     | 129357.298969      | 25      |
| Text 0.01%  | ~99%          | vectorchord     | Reached                         | 99.2                | 50-second throughput run   | 0.12                 | 6516.21            | 11327.481         | 11327.481          | 6       |
| Text 0.001% | ~90%          | pg_search       | Reached                         | 100                 | 50-second throughput run   | 265.66               | 3.722              | 3.762             | 3.823              | 13283   |
| Text 0.001% | ~90%          | pg_vectorsearch | MISSED (sweep budget exhausted) | 16.4                | Estimated from 25 queries  | 0.020385740940635326 | 50693.594498000006 | 56393.412822      | 57543.658168999995 | 25      |
| Text 0.001% | ~90%          | vectorchord     | Reached                         | 91                  | 50-second throughput run   | 0.02                 | 34562.538          | 34562.538         | 34562.538          | 1       |
| Text 0.001% | ~95%          | pg_search       | Reached                         | 100                 | 50-second throughput run   | 288.86               | 3.42               | 3.467             | 3.534              | 14443   |
| Text 0.001% | ~95%          | pg_vectorsearch | MISSED (sweep budget exhausted) | 16.4                | Estimated from 25 queries  | 0.020385740940635326 | 50693.594498000006 | 56393.412822      | 57543.658168999995 | 25      |
| Text 0.001% | ~95%          | vectorchord     | MISSED (sweep budget exhausted) | 91                  | Estimated from 100 queries | 0.04481397148051984  | 22495.411098       | 24395.610404      | 24870.771881       | 100     |
| Text 0.001% | ~99%          | pg_search       | Reached                         | 100                 | 50-second throughput run   | 287.74               | 3.435              | 3.471             | 3.544              | 14387   |
| Text 0.001% | ~99%          | pg_vectorsearch | MISSED (sweep budget exhausted) | 16.4                | Estimated from 25 queries  | 0.020385740940635326 | 50693.594498000006 | 56393.412822      | 57543.658168999995 | 25      |
| Text 0.001% | ~99%          | vectorchord     | MISSED (sweep budget exhausted) | 91                  | Estimated from 100 queries | 0.04481397148051984  | 22495.411098       | 24395.610404      | 24870.771881       | 100     |

One concurrent client; 10-second warmup followed by a fixed 50-second completion window. Late completions are excluded. Recall was checked separately on 100 held-out query vectors. Missing throughput is not zero throughput. Estimated QPS is 1000 divided by average query time, rather than throughput measured over 50 seconds. Estimates based on only 25 queries are preliminary and do not establish that the recall target was reached.

[pg_search source run](https://github.com/paradedb/paradedb/actions/runs/44474015518), [vectorchord source run](https://github.com/paradedb/paradedb/actions/runs/44474018293), [vectorchord-prefilter source run](https://github.com/paradedb/paradedb/actions/runs/44474021901), [pg_vectorsearch source run](https://github.com/paradedb/paradedb/actions/runs/44443645938)

Unfiltered vector search is a closer contest, and is where the existing Postgres vector extensions do well. On the MS MARCO 113 million dataset[^msmarco-vectorchord]:

- ParadeDB delivers 2.0×–9.5× the throughput of `vectorchord` across the board.
- ParadeDB outperforms `pg_vectorsearch` in four of the five comparisons where both reached the recall target. `pg_vectorsearch` leads for top 10 at 90% recall. It missed the top-10 99% recall target.

### MS MARCO unfiltered vector search

| Workload | Recall target | Engine          | Target status | Measured recall (%) | Measurement                | QPS               | p50 (ms)   | p95 (ms)   | p99 (ms)           | Queries |
| -------- | ------------- | --------------- | ------------- | ------------------- | -------------------------- | ----------------- | ---------- | ---------- | ------------------ | ------- |
| Top 10   | ~90%          | pg_search       | Reached       | 90.1                | 50-second throughput run   | 257.92            | 3.642      | 5.119      | 5.641              | 12896   |
| Top 10   | ~90%          | pg_vectorsearch | Reached       | 90.6                | 50-second throughput run   | 336.06            | 2.848      | 4.488      | 5.649              | 16803   |
| Top 10   | ~90%          | vectorchord     | Reached       | 90.2                | 50-second throughput run   | 131.88            | 7.482      | 8.407      | 8.877              | 6594    |
| Top 10   | ~95%          | pg_search       | Reached       | 95.2                | 50-second throughput run   | 96.32             | 8.178      | 20.538     | 22.215             | 4816    |
| Top 10   | ~95%          | pg_vectorsearch | Reached       | 95                  | 50-second throughput run   | 72.64             | 13.392     | 19.048     | 24.133             | 3632    |
| Top 10   | ~95%          | vectorchord     | Reached       | 95                  | 50-second throughput run   | 41.48             | 24.06      | 26.355     | 27.243             | 2074    |
| Top 10   | ~99%          | pg_search       | Reached       | 99.1                | 50-second throughput run   | 8.4               | 84.91      | 307.842    | 552.469            | 420     |
| Top 10   | ~99%          | pg_vectorsearch | MISSED        | 98.6                | Estimated from 100 queries | 4.080910290964055 | 239.814319 | 308.616423 | 351.34272799999997 | 100     |
| Top 10   | ~99%          | vectorchord     | Reached       | 99                  | 50-second throughput run   | 0.88              | 1097.98    | 1422.984   | 1590.018           | 44      |
| Top 100  | ~90%          | pg_search       | Reached       | 90.02               | 50-second throughput run   | 142.18            | 6.791      | 8.894      | 10.463             | 7109    |
| Top 100  | ~90%          | pg_vectorsearch | Reached       | 90.01               | 50-second throughput run   | 106.2             | 8.816      | 13.276     | 18.694             | 5310    |
| Top 100  | ~90%          | vectorchord     | Reached       | 90.02               | 50-second throughput run   | 53.22             | 18.738     | 20.353     | 20.888             | 2661    |
| Top 100  | ~95%          | pg_search       | Reached       | 95                  | 50-second throughput run   | 51.42             | 21.498     | 29.016     | 32.252             | 2571    |
| Top 100  | ~95%          | pg_vectorsearch | Reached       | 95.02               | 50-second throughput run   | 35.12             | 27.747     | 40.66      | 50.578             | 1756    |
| Top 100  | ~95%          | vectorchord     | Reached       | 95.03               | 50-second throughput run   | 10.6              | 93.061     | 119.159    | 123.329            | 530     |
| Top 100  | ~99%          | pg_search       | Reached       | 99                  | 50-second throughput run   | 1.66              | 338.095    | 1976.732   | 3064.524           | 83      |
| Top 100  | ~99%          | pg_vectorsearch | Reached       | 99.01               | 50-second throughput run   | 1.46              | 650.481    | 1008.896   | 1113.794           | 73      |
| Top 100  | ~99%          | vectorchord     | Reached       | 99.04               | 50-second throughput run   | 0.74              | 1309.721   | 1774.779   | 1873.94            | 37      |

One concurrent client; 10-second warmup followed by a fixed 50-second completion window. Late completions are excluded. Recall was checked separately on 100 held-out query vectors. Missing throughput is not zero throughput. Estimated QPS is 1000 divided by average query time, rather than throughput measured over 50 seconds. Estimates based on only 25 queries are preliminary and do not establish that the recall target was reached.

[pg_search source run](https://github.com/paradedb/paradedb/actions/runs/44474025772), [vectorchord source run](https://github.com/paradedb/paradedb/actions/runs/44138407892/job/134234181106), [pg_vectorsearch source run](https://github.com/paradedb/paradedb/actions/runs/44133884816)

  To the best of our knowledge, every other Postgres platform uses one of
  `pgvector`, `vectorchord`, `pg_vectorsearch`, or a rebranded fork for vector
  search.

## Constraining Memory During Index Build

Vector indexes that require memory usage to increase linearly with dataset size fundamentally do not scale.

For us, the main challenge with constraining memory during index build was making our k-means algorithm bounded in memory. For context, the ParadeDB vector index is a [cluster-based index](#a-deeper-look-at-our-cluster-based-architecture), and k-means is the standard algorithm for generating clusters. If not handled carefully, k-means increases memory consumption with dataset size, since larger datasets produce more clusters which require more data points to be sampled.

ParadeDB circumvents this by implementing a streaming k-means algorithm. The idea is that instead of holding the entire training set in memory, we read vectors in batches and do k-means iteration over each batch. We have open-sourced [our k-means implementation](https://github.com/paradedb/superkmeans-rs). It's a Rust port of [SuperKMeans](https://github.com/cwida/SuperKMeans), a C++ library developed by researchers at [CWI](https://www.cwi.nl/en/), with additional features like streaming k-means, cluster balancing, and boundary replication of vectors across clusters.

To demonstrate our memory efficiency, all benchmarks in this post were run on a Docker container with 32GB memory, only 8GB of which was allocated to index build (via `maintenance_work_mem`). This memory allocation is a tiny fraction of the total dataset and index size. MSMarco's embeddings alone contain approximately 430GB of float values.

Under the 8GB memory constraint, only the ParadeDB index built the MSMarco dataset successfully at its default settings. Both `pg_vectorsearch` and `vectorchord` ran out of memory, crashed, and required adjustments. Because `vectorchord` holds the training set in memory, it requires the k-means sampling rate to be manually dialed down (which degrades the quality of the resulting index). `pg_vectorsearch` had a memory leak that we [fixed](https://github.com/timescale/pg_vectorsearch/pull/417).

We also optimized our index build time to be very fast. Here's how long it took to index the 113M MSMarco vectors:

### MS MARCO index build time (lower is better)

| Engine          | Minutes | Source                                                                                                      |
| --------------- | ------- | ----------------------------------------------------------------------------------------------------------- |
| ParadeDB        | 145.4   | [Run 44474025772](https://github.com/paradedb/paradedb/actions/runs/44474025772)                            |
| pg_vectorsearch | 181.6   | [Run 44133884816](https://github.com/paradedb/paradedb/actions/runs/44133884816)                            |
| Turbopuffer     | 298.3   | Reported build tand index ime                                                                               |
| vectorchord     | 554.1   | [Run 44443662907](https://github.com/paradedb/paradedb/actions/runs/44443662907/job/135290426513#step:20:1) |

32 GiB RAM per Postgres database, with 8 GiB maintenance_work_mem. Postgres timings cover CREATE INDEX, excluding data loading. Turbopuffer includes the full time to load and index the data, which includes network transmission. This time is still representative of the time taken if an external index was connected to Postgres.

## Constraining Memory During Search

One of the reasons we picked a cluster-based vector index over a graph-based index like HNSW is because the access patterns of cluster-based indexes are much more friendly when the index is too big to fit in memory.

Because HNSW follows vector connections scattered throughout a graph, each hop can turn into a random disk read on uncached data. This is why `pgvector`, which uses HNSW, forces many users to raise their instance's memory to the size of the index. It's also why we are skeptical of any HNSW-based vector index's ability to scale.

Cluster-based indexes, on the other hand, store each cluster's vectors contiguously, so searching a cluster translates into sequential reads.
Our index is specifically designed to incur as few disk reads as possible. In our benchmarks, we ensure that most of the index cannot simply be cached in memory for search by sizing the Postgres `shared_buffers` pool to `8GB`.

## A Deeper Look at Our Cluster-Based Architecture

Our architecture draws on the [SPANN](https://arxiv.org/abs/2111.08566) and [Quake](https://arxiv.org/abs/2506.03437) papers:

### Step 1: Find the most promising clusters

The starting idea is simple: group similar vectors into clusters, and give each cluster a representative vector called a centroid. A query first finds the nearest centroids, then compares itself against the vectors in just those clusters instead of the entire dataset.

ParadeDB extends this idea into a hierarchy: clusters can be created over clusters. This idea, borrowed from [Quake](https://arxiv.org/abs/2506.03437), allows the centroid list to scale. As the dataset grows, another level in the hierarchy keeps each layer small.

Search starts at the top of the hierarchy and works its way down. Once the bottom is reached, the most promising clusters are visited.

### Step 2: Scan clusters to eliminate noncompetitive vectors

Each cluster stores quantized vectors. Quantization compresses vectors, allowing noncompetitive vectors to be cheaply eliminated without paying the cost of full precision scoring.

ParadeDB uses a two-layer quantization strategy, where the first layer 1-bit quantizes the vector's residual from its cluster centroid, and the second layer 1-bit quantizes the error left by the first layer. Quantized vectors are also boundary replicated, meaning that a vector sitting close to two clusters is replicated across both. This technique, borrowed from [SPANN](https://arxiv.org/abs/2111.08566), helps with recall.

Filters are also applied here. If a vector's identifier fails the filter, we skip its quantized vector.

### Step 3: Score the survivors at full precision

Finally, candidates that survive both layers of the quantized scan are ranked by their full precision vectors to produce the final result set. The idea is that each previous pruning step (cluster scan, then two quantized layers) constricts the search space further.

By the time this step is reached, the full precision candidate set is very small (in our 113M MSMarco dataset, only a few hundred candidates survive to this point).

Like the rest of ParadeDB, our vector search implementation is entirely open source:

<ul>
  <li>
    <a
      target="_blank"
      rel="noopener noreferrer"
      href="https://github.com/paradedb/paradedb">
      
      <span>ParadeDB</span>
    </a>
    <span>: The Postgres extension and SQL integration.</span>
  </li>
  <li>
    <a
      target="_blank"
      rel="noopener noreferrer"
      href="https://github.com/paradedb/tantivy">
      
      <span>Our Tantivy fork</span>
    </a>
    {/* prettier-ignore */}
    <span>: Vector indexing, routing, and search. We will upstream as much of this as possible in the coming months.</span>
  </li>
  <li>
    <a
      target="_blank"
      rel="noopener noreferrer"
      href="https://github.com/paradedb/superkmeans-rs">
      
      <span>SuperKMeans</span>
    </a>
    <span>: Rust port of SuperKMeans for building clusters.</span>
  </li>
</ul>

## Continuous Updates are Next

Our next target is support for continuous updates (i.e. preventing frequent updates from affecting recall/performance). We are solving this by allowing clusters
to cheaply update themselves as new data arrives. Our approach will lean on both [SPFresh](https://arxiv.org/abs/2410.14452) for cluster rebalancing and [segment partitioning](https://www.paradedb.com/docs/reference/indexing/partition-by) to create an optimal
distribution of vectors across our segment-based layout.

This means that for now, our vector search is tested and ready for mostly static datasets (i.e. an index that can be created after all the data has been loaded, and new data infrequently arrives). If your vector search workload requires frequently updated data, [contact us](/contact). We'd love to work closely with you as we build it.

  <p>
    {
      "This is specifically for ParadeDB indexes containing vectors. For all other fields, we "
    }
    <a
      href="/blog/increased-write-performance"
      target="_blank"
      rel="noopener noreferrer">
      {"ensure high read performance under continuous writes"}
    </a>
    {"."}
  </p>

## Wrapping Up

ParadeDB already delivers excellent filtered text search to Postgres, eliminating the need for a separate search engine like Elasticsearch. Now we're doing the same for vectors.

Our vector search has already been in beta for two months. The features in this post are available on ParadeDB `0.27.0` and later. We invite you to run it over your data [locally](https://www.paradedb.com/docs/start/install) or on [ParadeDB Cloud](https://app.paradedb.com).

[^filtered-dataset]: The MSMarco dataset does not contain filterable fields, so we use Hacker News for the filtered search benchmarks. Turbopuffer requires a vector on load, so we loaded the 24.1 million Hacker News rows with embeddings out of 28.7 million total. Because no vectors were dropped, no results will change.

[^recall]: Recall measures how many of the actual nearest neighbors a search finds. For example, finding nine out of the ten actual nearest neighbors would result in a 90% recall value.

[^turbopuffer-methodology]:
    Recall@k measures how many of the actual top-k nearest neighbors a search returns. Turbopuffer [automatically tunes its vector index](https://turbopuffer.com/docs/vector) to stay within a recall range. The graphs show the measured recall for each Turbopuffer query alongside ParadeDB runs with higher and lower recall. This shows the tradeoff between accuracy and throughput.

    These are **warm runs**. Turbopuffer uses object storage such as S3, which lets it scale storage and compute independently. It [caches data on NVMe SSD and in memory](https://turbopuffer.com/docs/architecture). The benchmark waited for indexing to finish and then sent a [cache-warming hint](https://turbopuffer.com/docs/warm-cache). It ran queries until performance stabilized, which sometimes took several iterations. Turbopuffer runs on separate cloud hardware in a setup closer to a serverless database. Its measurements include network latency. The results compare the deployments we tested.

[^index-design]: The index draws on [SPANN](https://arxiv.org/abs/2111.08566) and [Quake](https://arxiv.org/abs/2506.03437). Our [open-source k-means implementation](https://github.com/paradedb/superkmeans-rs) is a Rust port of CWI's [SuperKMeans](https://github.com/cwida/SuperKMeans), with work on streaming, balanced clustering, and performance. We use a hierarchical variant to build the index.

[^hn-dataset]: The Postgres Hacker News dataset contains 28.7 million rows, including approximately 24 million non-null 1,536-dimensional vectors from OpenAI's `text-embedding-3-small`. Text filters match 0.1%, 0.01%, and 0.001% of rows; range filters match 10%, 1%, and 0.1%. Each is tested at 90%, 95%, and 99% recall targets.

[^vectorsearch-build]: The original `pg_vectorsearch` index build exhausted our 128 GB container. These results use a fork that fixes the leak.

[^vectorchord-mode]: For filtered queries, `vectorchord` supports two modes: prefiltering [on](https://github.com/paradedb/paradedb/actions/runs/44474021901) or [off](https://github.com/paradedb/paradedb/actions/runs/44474018293). We benchmarked both and automatically selected the faster result that reached each recall target. If neither mode reached the target, we show the result with the highest measured recall.

[^msmarco-vectorchord]: The MS MARCO VectorChord search results come from a 64-CPU run with no Docker CPU limit. The first 8-CPU run stopped during the recall sweep. We'll replace these results once the 8-CPU rerun completes successfully. We do not expect this to make much difference as the runs do not saturate CPU. [64-CPU run](https://github.com/paradedb/paradedb/actions/runs/44138407892/job/134234181106) · [First 8-CPU run](https://github.com/paradedb/paradedb/actions/runs/44443662907) · [8-CPU rerun](https://github.com/paradedb/paradedb/actions/runs/44543318268)

[^missed-recall]: When a recall target was missed we estimate QPS using the average query time at the highest measured recall.
