Skip to content

features: single-shot and paged execution modes for multi-queries#555

Open
cportele wants to merge 1 commit into
masterfrom
multi-feature-query-scopes
Open

features: single-shot and paged execution modes for multi-queries#555
cportele wants to merge 1 commit into
masterfrom
multi-feature-query-scopes

Conversation

@cportele

Copy link
Copy Markdown
Contributor

A multi-feature query can run single-shot - one pass per (sub-query, table), with no meta query, no chunking and no key-range window - using a server-side cursor to keep memory bounded; an optional per-sub-query maximum bounds each sub-query. When paged, numberMatched is computed across all sub-queries (the invariant total) while value queries are executed only for the sub-queries needed for the page.

Part of ldproxy/ldproxy#1672.

A multi-feature query can run single-shot - one pass per (sub-query, table), with no meta query, no chunking and no key-range window - using a server-side cursor to keep memory bounded; an optional per-sub-query maximum bounds each sub-query. When paged, numberMatched is computed across all sub-queries (the invariant total) while value queries are executed only for the sub-queries needed for the page.
@cportele cportele requested a review from azahnen as a code owner June 28, 2026 10:41
// A positive fetch size requires a transaction so the database driver uses a server-side cursor
// and streams rows instead of buffering the whole result set in memory (PostgreSQL ignores the
// fetch size with autoCommit=true).
// TODO encapsulating the query in a transaction is also a workaround for what appears to be a

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new Todo was discovered. If it is not a priority right now,consider marking it for later attention.
TODO encapsulating the query in a transaction is also a workaround for what appears to be a

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