Reproducible benchmark · recognized dataset
At every search setting the two engines return the same recall — both trace one curve from 0.73 to 0.91 — but pgContext answers each query 3.8 to 5.3× faster. The gap widens with search effort: at ef_search 512, pgContext holds 0.910 recall@10 at 2.44 ms where pgvector reaches the same recall at 12.97 ms.
| ef_search | pgContext recall | pgContext p50 | pgvector recall | pgvector p50 | speed-up |
|---|---|---|---|---|---|
| 64 | 0.731 | 0.67 ms | 0.750 | 2.56 ms | 3.8× |
| 128 | 0.810 | 0.94 ms | 0.820 | 4.14 ms | 4.4× |
| 256 | 0.868 | 1.46 ms | 0.870 | 7.09 ms | 4.9× |
| 512 | 0.910 | 2.44 ms | 0.910 | 12.97 ms | 5.3× |
| System | Build time | Relative |
|---|---|---|
| pgvector | 50.3 s | 1.00× |
| pgContext | 88.0 s | 1.75× |
pgvector builds the index faster; pgContext trades that for the query-time advantage above. Build throughput is an area of active work.