Zachi's pg-jev judges 2,000 Postgres rows in about 3.5 seconds

Zachi's pg-jev judges a 2,000-row Postgres table in about 3.5 seconds for about $0.012. Version 0.2.0 packs 20 rows per request. The page at pgjev.com still says 40. Jose Mejias's pg-jev is a different repository.

Zachi posted realZachi/pg-jev on September 17, 2026. The line in the post is WHERE jev(people, 'could work from home'). He reports 129 rows judged in about a second for $0.0009, and a second run in 6 ms from the session cache. The repository is the PostgreSQL License. On PGXN the extension is named jev, and version 0.2.0 is what pgxn install jev installs. Jose Mejias’s pg-jev is a different repository, mejiasd3v/pg-jev, and its function is prompt_jev.

Version 0.2.0 is dated September 18. The README measures a 2,000-row table from Europe, about 190 ms from the API. The first run took about 3.5 seconds in 100 requests, about 296,000 input tokens, and about $0.012. The same condition from cache took about 50 ms. LIMIT 3 on a new condition took about 0.6 seconds. A new condition while pooled connections were still warm took about 2.3 seconds.

Version 0.1.0 needed 8.5 seconds and 338,000 tokens for the full query, and 8.4 seconds for that LIMIT. The changelog says the new path uses 12% fewer input tokens, and that the batched answers match single-row evaluation. Noul questions no longer send a generic criteria string. The changelog says that string was 16% of input tokens and changed no answers.

The 0.2.0 defaults pack 20 rows per request and keep 16 requests in flight. Jev has to find rows[i] by position. On ground truth from structured columns, job title, EU membership, and a phrase in a free-text field, 400 rows each, batches of 1 to 20 rows were 100% correct. Batches of 40 were 92% to 98%. Batches of 80 were 77% to 94%. Rows of 1,000 characters did not change the result at 20. Naming the rows instead of indexing them did not help.

Batches of 20 cost 4% more input tokens than batches of 40. One row alone is about 435 tokens. A row inside a batch of 20 is about 175. pgjev.com still says the extension packs 40 rows per request and runs six requests at once, which are the 0.1.0 defaults. The timing cards on that page, 3.5 seconds, $0.012, and 50 ms, match the 0.2.0 README.

The demo at pgjev.zachi.dev packs 20 rows and keeps up to 32 requests in flight. It says a 130-row table costs under a tenth of a cent, at about $0.042 per million input tokens. The public demo allows one read-only SELECT, a 20 second statement timeout, and at most 2,500 rows sent to the model. Its four tables are invented.

jev() is true when the probability clears a threshold, 0.5 unless the call or jev.threshold sets another line. jev_prob returns that probability. jev_choice and jev_score classify and place the row. jev_eval returns the raw jsonb, including probabilities and confidence. Answers stay in the backend session, so a repeat, a new threshold, or ORDER BY jev_prob(...) does not call the API again. A subquery or CTE with an anonymous record type is judged one request at a time. The default model is jev-latest. Calls go to https://api.typesafe.ai/v1/systemone.

Later on September 18 he posted that the docs were live at pgjev.com, and that npx skills add realZachi/pg-jev installs an agent skill for setup.

Install needs PostgreSQL 14, 15, 16, or 17, the untrusted language plpython3u, and a superuser. The docs say Supabase, Neon, RDS, and Aurora cannot load it unless you control the server and can install the language. On September 18 he wrote that a rewrite in plpgsql and HTTP would drop the concurrency, and that 2,000 rows would take about 8.2 seconds instead of 1.7. The 1.7 second figure is that post’s comparison. The README’s Europe measurement for 0.2.0 is the 3.5 second row. The same day he wrote that throwing the function at a million-row table will not work.

The key can be TYPESAFE_API_KEY on the server process, or SET jev.api_key. The spend caps jev.max_rows_per_statement and jev.max_chars_per_statement default to off. Row contents are sent to TypeSafe. The regression suite talks to a mock API. We did not install the extension.

duckdb-jev published a live Choice figure, 2,049 rows in 0.887 seconds, on twelve ticket templates. MotherDuck’s prompt_jev() published 89% on 100,000 AG News training rows, 40 seconds, $0.50. postgres-search can sink a SQL hit and says that Jev pass was not measured. Jevflake asks from Snowflake.

This site's reading

Editorial notes evaluating claims against primary sources, contextualizing findings alongside related implementations, and defining technical terms.

Verify

Primary post is @iam_zachi, September 17, 2026, 20:12 UTC. The example is WHERE jev(people, 'could work from home'). The post says 129 rows in about one second for $0.0009, and a second run in 6 ms from cache. The repository is realZachi/pg-jev, PostgreSQL License, copyright Zachi, 2026. On PGXN the extension is named jev. META.json says 0.2.0.

This is not mejiasd3v/pg-jev. That extension is prompt_jev and returns jsonb.

README measurement, a 2,000-row table from Europe, about 190 ms to the API: first run about 3.5 seconds, 100 requests, about 296,000 input tokens, about $0.012. Cache about 50 ms. LIMIT 3 on a new condition about 0.6 seconds. A new condition with pooled connections still warm about 2.3 seconds. Version 0.1.0 was 8.5 seconds and 338,000 tokens, and 8.4 seconds for the LIMIT. The changelog says 12% fewer input tokens, and that batched answers match single-row evaluation.

Ground truth, 400 rows each, job title, EU membership, and a phrase in free text: batches of 1 to 20 were 100% correct, 40 were 92% to 98%, and 80 were 77% to 94%. Defaults in 0.2.0 are batch_size 20 and concurrency 16. pgjev.com still prints 40 rows per request and six concurrent requests. The demo at pgjev.zachi.dev prints 20 rows and up to 32 in flight.

PostgreSQL 14 through 17, plpython3u, superuser. The docs say Supabase, Neon, RDS, and Aurora cannot run it unless you control the server. A September 18 post says a plpgsql and HTTP rewrite would take about 8.2 seconds instead of 1.7 on 2,000 rows. That 1.7 second figure is the post. The README's Europe row for 0.2.0 is 3.5 seconds. The same day he wrote that a million-row table will not work as one scan.

Row text is sent to TypeSafe. Regression tests use a mock and do not call the live API. We did not install the extension. TypeSafe's Master Customer Agreement section 2.3(f) forbids customers from publishing benchmarks of the Services. These figures are the author's, reported as published.

Compare

Jose Mejias's pg-jev is a different PostgreSQL extension. prompt_jev returns jsonb, one HTTP call per row, and the README prints no scored set. CI there is described as PostgreSQL 14 through 18.

duckdb-jev published 2,049 rows in 0.887 seconds on twelve ticket templates, a throughput check. MotherDuck's prompt_jev() published 89% on 100,000 AG News training rows, 40 seconds, $0.50. postgres-search prints an 82% SQL first-place rate and says the Jev pass was not measured. Jevflake asks from Snowflake.

Zachi's extension batches 20 rows, caches answers for the session, and prints a position check that falls off above 20 rows. All of them send row text to a provider.

Terms

jev()
In realZachi/pg-jev, a boolean PostgreSQL function. It is true when the Noul probability for a plain-language condition clears a threshold. The default threshold is 0.5.
jev.batch_size
How many rows realZachi/pg-jev packs into one System One request. Version 0.2.0 defaults to 20. The README's ground-truth check was 100% at 1 to 20 rows and 92% to 98% at 40.

Sources

  1. Zachi on X, pg-jev
  2. realZachi/pg-jev
  3. Changelog, 0.2.0
  4. pgjev.com
  5. Where it runs
  6. Live demo
  7. Zachi on X, Supabase
  8. Zachi on X, a million rows
  9. Zachi on X, docs and the agent skill