Visitar URL original
bindings docs: whole-type aggregates and distinct values, SQL GROUP BY in the parallel workers (26.10.1, upstream #8797, #8799) by tae898 · Pull Request #41 · humemai/arcadedb-embedded-python · GitHub
Skip to content

bindings docs: whole-type aggregates and distinct values, SQL GROUP BY in the parallel workers (26.10.1, upstream #8797, #8799) - #41

Merged
tae898 merged 3 commits into
mainfrom
docs/cypher-aggregates-one-core
Oct 1, 2026
Merged

tae898 merged 3 commits into
mainfrom
docs/cypher-aggregates-one-core

Conversation

@tae898

@tae898 tae898 commented Oct 1, 2026 •

Copy link
Copy Markdown

Closes #40.

The queries guide gains two paragraphs under 'Scans run in parallel only outside a transaction', both measured on upstream main 3d5e1a5, 2,000,000 records, 12 cores, Temurin 25 and 21, one bucket and eight, every answer equal across forms:

  1. Whole-type aggregates: in 26.10.1 a SQL aggregate over a type scan runs in the parallel workers, while an openCypher aggregate over a label runs on one thread (an unfiltered label scan is sequential; with a WHERE the scan is parallel and the aggregation is not). sum 127-130 ms in SQL against 680-752 ms in Cypher; group-by 226-239 ms against 973-1,146 ms. Advice: write whole-type aggregates in SQL until openCypher: an aggregate over a label runs on one core, 4-8x behind the same SQL aggregate since #8524 (sum over 2M vertices: 680 ms against 127 ms) ArcadeData/arcadedb#8797 changes it.
  2. Distinct values: SQL SELECT DISTINCT projects and dedups on one thread, while GROUP BY over the same columns runs in the workers and returns the same rows. 1,185-1,481 ms against 92-111 ms; with a WHERE 695-859 ms against 98-103 ms. Advice: GROUP BY (SQL SELECT DISTINCT projects and dedups on the consumer thread: 13x slower than GROUP BY over the same column (1,185 ms against 92 ms at 2M records) ArcadeData/arcadedb#8799).

Example 05 (and its docs page) now reads its user ids with SELECT userId FROM Rating GROUP BY userId ORDER BY userId in place of a SELECT DISTINCT subquery; its docstring note about the older direct DISTINCT form is rewritten. All three creation modes (--method sql, --method java, --method java --no-async) re-run on the 26.10.1.dev0 wheel against movielens-small with both databases open: 610 users and every baseline match, as before the change.

Repros kept in the private notes (agg-parallel).

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWcDr7TwvcfMsQkeYQVHZr

tae898 and others added 2 commits October 1, 2026 17:49
…one in Cypher (26.10.1, upstream ArcadeData#8797) (#40)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWcDr7TwvcfMsQkeYQVHZr
…(26.10.1, upstream ArcadeData#8799) (#40)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWcDr7TwvcfMsQkeYQVHZr
@tae898 tae898 changed the title bindings docs: whole-type aggregates run on every core in SQL and on one in Cypher (26.10.1, upstream #8797) bindings docs: whole-type aggregates and distinct values, SQL GROUP BY in the parallel workers (26.10.1, upstream #8797, #8799) Oct 1, 2026
…pstream ArcadeData#8799) (#40)

All three creation modes (sql, java, java --no-async) re-run on the 26.10.1.dev0 wheel
against movielens-small with both databases open: 610 users and every baseline match.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWcDr7TwvcfMsQkeYQVHZr
@tae898
tae898 merged commit b45ed7f into main Oct 1, 2026
48 checks passed
@tae898
tae898 deleted the docs/cypher-aggregates-one-core branch October 1, 2026 09:54
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.

bindings docs: whole-type aggregates and distinct values run on every core only through SQL GROUP BY (26.10.1, upstream #8797, #8799)

1 participant