Contents
bench/ef_search.sh results
What measure() reports for one hnsw index as hnsw.ef_search changes. Method: the script
generates 20,000 vector(64) rows, uniform in [-1, 1], from setseed(0.42); builds an hnsw
index (vector_cosine_ops, default m 16 and ef_construction 64); then, for each
ef_search, runs measure('items_hnsw', 10, 100) three times (k = 10, 100 query vectors drawn
at random from the table, so the three runs differ). The data is the same on every run; the
index is not: hnsw draws each element’s level at random, and setseed does not seed that.
- Date: 2026-11-28
- Code: pg_recall_guard 0.3.0 (
measure()reads the same rows as in 0.2.11). - PostgreSQL 19.0, built from
REL_19_STABLE8efc01ba3ec,CFLAGS=-O2, no assertions; pgvector 0.8.6, built from its repository at v0.8.6-57-g81d65ce. - Machine: AMD Ryzen AI 9 HX 370, Fedora, Linux 7.3.3.
- Command, four times:
bench --carril a -- <start a cluster> bash bench/ef_search.sh. The lane’s sentinel reported other load on every run. That changes how long a run takes, not which rows a query returns: these are counts, not times.
hnsw.ef_search |
build 1 | build 2 | build 3 | build 4 |
|---|---|---|---|---|
| 1 | 0.0020, 0.0040, 0.0000 | 0.0050, 0.0050, 0.0020 | 0.0010, 0.0050, 0.0030 | 0.0040, 0.0010, 0.0040 |
| 10 | 0.8380, 0.8630, 0.8450 | 0.8520, 0.8530, 0.8460 | 0.8330, 0.8280, 0.8350 | 0.8480, 0.8370, 0.8510 |
| 40 (default) | 0.9270, 0.8810, 0.9160 | 0.9030, 0.9030, 0.9020 | 0.8880, 0.8970, 0.9060 | 0.9000, 0.8930, 0.9000 |
| 100 | 0.9500, 0.9490, 0.9520 | 0.9510, 0.9680, 0.9480 | 0.9410, 0.9510, 0.9360 | 0.9570, 0.9520, 0.9620 |
Earlier, on 2026-11-12 (pg_recall_guard 0.2.9, PostgreSQL 13.23, pgvector 0.8.6, one build): 0.0020, 0.0030, 0.0030 / 0.8460, 0.8470, 0.8250 / 0.9100, 0.9120, 0.9140 / 0.9540, 0.9490, 0.9520. One build gave a narrower range than four.
Before that the README carried a table without a script behind it (PostgreSQL 19beta2,
pgvector 0.8.6 and pgvectorscale 0.9.0, 38,352 vector(768) rows: 0.0000 / 0.9000 / 1.0000).