Skip to content

Refactor bookstore to load data in very few queries#40

Merged
alexjpwalker merged 1 commit into
typedb:masterfrom
alexjpwalker:bookstore-few-queries
Apr 23, 2026
Merged

Refactor bookstore to load data in very few queries#40
alexjpwalker merged 1 commit into
typedb:masterfrom
alexjpwalker:bookstore-few-queries

Conversation

@alexjpwalker
Copy link
Copy Markdown
Member

Product change and motivation

The bookstore sample dataset now loads its data using very few queries (31, down from about 310).

This allows HTTP-based clients to load it very quickly without getting bottlenecked hard by network latency.

Implementation

By making the match stages much chunkier we can drastically cut down on the total number of insert stages required to insert all data. For some types, we go from N queries to 1 for insertion of all instances of said type.

@alexjpwalker alexjpwalker merged commit 5ccb35f into typedb:master Apr 23, 2026
4 checks passed
@alexjpwalker alexjpwalker deleted the bookstore-few-queries branch April 23, 2026 17:12
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.

1 participant