Visitar URL original
benchmarks: the PostgreSQL-family and QuestDB arms use the vendor's documented client paths (autocommit, binary COPY, binary cursors) by tae898 · Pull Request #251 · humemai/arcadedb-embedded-python · GitHub
Skip to content

benchmarks: the PostgreSQL-family and QuestDB arms use the vendor's documented client paths (autocommit, binary COPY, binary cursors) - #251

Merged
tae898 merged 1 commit into
mainfrom
g3-postgres-client-paths
Oct 6, 2026
Merged

tae898 merged 1 commit into
mainfrom
g3-postgres-client-paths

Conversation

@tae898

@tae898 tae898 commented Oct 6, 2026 •

Copy link
Copy Markdown

Closes #250. Changes only benchmarks/experiments: l1_tpc.py, l3d_dense.py, e2_hybrid.py, l4_tsbs.py, CAMPAIGN.md (section 7 row 76), and PROTOCOL.md (section 7, three rows).

PostgresTPC (and postgres_tuned) runs the timed calls in autocommit, set after the final commit of build(), which stays one transaction. The four CRUD calls and the analytics reads send one message each. New-order and payment keep BEGIN, three statements, COMMIT through with self.cx.transaction():. psycopg pipeline mode is not used (measured slower, 0.82x and 0.88x).

PgVector.connect and PgAgeE2.__init__ call register_vector(self.cx), and the dense and product loads use binary COPY with cp.set_types([...]) and numpy rows. The pgvector import is lazy, inside those two methods, so a stage that never touches pgvector never needs the package. The sparse pgvector load is untouched (1.09x, a null). QuestTS reads go through a _q helper that passes binary=True.

Effects, from the G3 laptop A/B (12 interleaved repetitions, E cores 8-11): CRUD calls 1.83x to 1.96x faster, pgvector ingest column 9.1x to 13.2x faster, QuestDB q_high 1.34x and the other five reads null. None of it flatters ArcadeDB. The 1.9x CRUD figure still needs a mini confirmation before it is printed.

Safety for the live campaign: tier 1 (ArcadeDB only) stages do import these four modules, so the check before merging is real, but nothing changed at module level (no new top-level import, constant, or call): only the bodies of the PostgresTPC, PgVector, PgAgeE2, and QuestTS methods changed, and no ArcadeDB arm runs them. build_images.sh is not touched. The pgvector==0.5.0 and neo4j-rust-ext==6.3.1.0 pins are tracked as a pending TODO row (76) in CAMPAIGN.md section 7 and land with the tier 1 to tier 2 image rebuild. Until then a pgvector_dense or pg_age_e2 cell on the current client image fails at connect with an ImportError, loudly and by design.

Gates run: compile() on all four touched modules; import of l1_tpc, l3d_dense, e2_hybrid, l4_tsbs in a venv with psycopg 3.3.6 and pgvector 0.5.0; the full benchmarks/experiments pytest suite, whose failure and error set (1 failed, 45 errors, 580 passed, 20 skipped) is identical on origin/main f6190b2 because those tests need results/ and .notes data that a worktree lacks; pre-commit hooks; comparator_pins_check, structure_check, and version_pin_check identical to origin/main. Laptop smoke through the lane classes against real PostgreSQL 18.6 (digest 7341002d), pgvector 0.8.6 (1d50c689), dbbench:pg-age, and QuestDB (931af415), origin/main against this branch: documents (crud, orders, stock, payments, q6) digests identical; dense 20,000 SIFT vectors stored rows and search digests identical; e2 5,000 products stored rows and view counts identical (the retrieval top-k differs between two HNSW builds of the same table, and origin/main against itself differs the same way); QuestDB 300,000 points, six answers identical.

Merge only after checking that no stage on mini is importing the touched modules at that moment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ubz3m6QXHESerCkehC1qgi

…ocumented client paths (#250)

PostgresTPC (and postgres_tuned) runs the timed calls in autocommit, new-order and payment keep BEGIN..COMMIT through cx.transaction(), build() stays one transaction. The pgvector dense and PG+AGE product loads use binary COPY with pgvector-python's types (import is lazy). The six QuestDB reads use binary=True. CAMPAIGN.md section 7 row 76 tracks the image pins that land at the tier 1 to tier 2 rebuild, PROTOCOL.md section 7 records the three client paths.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ubz3m6QXHESerCkehC1qgi
@tae898
tae898 merged commit a466dad into main Oct 6, 2026
2 checks passed
@tae898
tae898 deleted the g3-postgres-client-paths branch October 6, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

benchmarks: PostgreSQL-family and QuestDB arms use the vendor's documented client paths (autocommit, binary COPY, binary cursors)

1 participant