Skip to content

Release 0.2.7: reduce PostgreSQL graph binding count latency - #66

Merged
eldonm merged 2 commits into
mainfrom
fix/postgres-binding-summary-single-join
Nov 8, 2026
Merged

eldonm merged 2 commits into
mainfrom
fix/postgres-binding-summary-single-join

Conversation

@eldonm

@eldonm eldonm commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Exact graph binding summaries grouped the record/edge pairs and then joined the result back to the candidate set. PostgreSQL now groups one bounded left join. Records with no parent still contribute to the matched count. Malformed facts, missing or duplicate parent links, and overflow still cannot be treated as exact results.

On the same local PostgreSQL fixture of 500,000 records and 500,000 edges, four alternating runs per variant reduced median adapter query time from 4.277 s to 3.910 s. All samples returned the exact total. The PostgreSQL integration and binding suite passed (56 tests).

Release 0.2.7 packages this compatible performance fix for Core's published dependency pin.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Benchmark comparison

Threshold: ±25% (informational, does not block merge)

benchmark baseline (s) current (s) delta status
tests/benchmarks/test_deferred_save_benchmarks.py::test_bench_deferred_save_batched_100 0.012489 0.016215 +29.8% REGRESSION (+29.8%)
tests/benchmarks/test_deferred_save_benchmarks.py::test_bench_immediate_save_100 0.011606 0.016109 +38.8% REGRESSION (+38.8%)
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_projection_capture[hierarchy] 0.002142 0.003036 +41.8% REGRESSION (+41.8%)
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_projection_capture[ontology] 0.002245 0.002695 +20.1% OK
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_projection_capture[relationships] 0.002189 0.002695 +23.1% OK
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_rich_projection_capture[hierarchy] 0.001838 0.002376 +29.3% REGRESSION (+29.3%)
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_rich_projection_capture[ontology] 0.001806 0.002375 +31.5% REGRESSION (+31.5%)
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_rich_projection_capture[relationships] 0.001908 0.002482 +30.1% REGRESSION (+30.1%)
tests/benchmarks/test_jsondb_benchmarks.py::test_bench_jsondb_batched_saves_500 0.407616 0.499633 +22.6% OK
tests/benchmarks/test_jsondb_benchmarks.py::test_bench_jsondb_count_empty_query 0.001214 0.001493 +22.9% OK
tests/benchmarks/test_jsondb_benchmarks.py::test_bench_jsondb_count_filtered 0.058336 0.072468 +24.2% OK
tests/benchmarks/test_jsondb_benchmarks.py::test_bench_jsondb_find_filtered 0.056562 0.071619 +26.6% REGRESSION (+26.6%)
tests/benchmarks/test_jsondb_benchmarks.py::test_bench_jsondb_save_throughput 0.001855 0.001528 -17.7% OK
tests/benchmarks/test_postgres_benchmarks.py::test_bench_postgres_find_many_bulk 0.000529 0.000760 +43.6% REGRESSION (+43.6%)
tests/benchmarks/test_postgres_benchmarks.py::test_bench_postgres_traverse_depth 0.000317 0.000427 +34.8% REGRESSION (+34.8%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_count_empty 0.000119 0.000160 +34.2% REGRESSION (+34.2%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_count_fallback_via_regex 0.016299 0.022251 +36.5% REGRESSION (+36.5%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_count_pushdown 0.000752 0.001034 +37.5% REGRESSION (+37.5%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_find_fallback_via_regex 0.016848 0.022111 +31.2% REGRESSION (+31.2%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_find_pushdown 0.000209 0.000276 +31.9% REGRESSION (+31.9%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_sort_limit_pushdown 0.001478 0.001827 +23.7% OK

@eldonm eldonm added the release Release preparation and publication label Nov 8, 2026
@eldonm eldonm changed the title Reduce PostgreSQL graph binding count latency Release 0.2.7: reduce PostgreSQL graph binding count latency Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Benchmark comparison

Threshold: ±25% (informational, does not block merge)

benchmark baseline (s) current (s) delta status
tests/benchmarks/test_deferred_save_benchmarks.py::test_bench_deferred_save_batched_100 0.012489 0.016194 +29.7% REGRESSION (+29.7%)
tests/benchmarks/test_deferred_save_benchmarks.py::test_bench_immediate_save_100 0.011606 0.015562 +34.1% REGRESSION (+34.1%)
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_projection_capture[hierarchy] 0.002142 0.002812 +31.3% REGRESSION (+31.3%)
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_projection_capture[ontology] 0.002245 0.002682 +19.5% OK
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_projection_capture[relationships] 0.002189 0.002980 +36.2% REGRESSION (+36.2%)
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_rich_projection_capture[hierarchy] 0.001838 0.002431 +32.2% REGRESSION (+32.2%)
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_rich_projection_capture[ontology] 0.001806 0.002544 +40.8% REGRESSION (+40.8%)
tests/benchmarks/test_graph_projection_benchmarks.py::test_warm_rich_projection_capture[relationships] 0.001908 0.002516 +31.9% REGRESSION (+31.9%)
tests/benchmarks/test_jsondb_benchmarks.py::test_bench_jsondb_batched_saves_500 0.407616 0.500378 +22.8% OK
tests/benchmarks/test_jsondb_benchmarks.py::test_bench_jsondb_count_empty_query 0.001214 0.001520 +25.2% REGRESSION (+25.2%)
tests/benchmarks/test_jsondb_benchmarks.py::test_bench_jsondb_count_filtered 0.058336 0.071788 +23.1% OK
tests/benchmarks/test_jsondb_benchmarks.py::test_bench_jsondb_find_filtered 0.056562 0.072124 +27.5% REGRESSION (+27.5%)
tests/benchmarks/test_jsondb_benchmarks.py::test_bench_jsondb_save_throughput 0.001855 0.001465 -21.0% OK
tests/benchmarks/test_postgres_benchmarks.py::test_bench_postgres_find_many_bulk 0.000529 0.000750 +41.7% REGRESSION (+41.7%)
tests/benchmarks/test_postgres_benchmarks.py::test_bench_postgres_traverse_depth 0.000317 0.000421 +32.9% REGRESSION (+32.9%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_count_empty 0.000119 0.000165 +38.4% REGRESSION (+38.4%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_count_fallback_via_regex 0.016299 0.022483 +37.9% REGRESSION (+37.9%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_count_pushdown 0.000752 0.001019 +35.5% REGRESSION (+35.5%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_find_fallback_via_regex 0.016848 0.022013 +30.7% REGRESSION (+30.7%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_find_pushdown 0.000209 0.000275 +31.6% REGRESSION (+31.6%)
tests/benchmarks/test_sqlite_benchmarks.py::test_bench_sqlite_sort_limit_pushdown 0.001478 0.001848 +25.0% REGRESSION (+25.0%)

@eldonm
eldonm merged commit 68ee76b into main Nov 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Release preparation and publication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant