Skip to content

feat: Add concurrent result set materialization for driver.Query().Query(...) #1878

@kprokopenko

Description

@kprokopenko

What to add
Add a single new option for db.Query(ctx, sql, query.WithConcurrentResultSets(true)) that enables option

ConcurrentResultSets: false,

When queries return multiple result sets, some may be computed concurrently. If enabled, parts of different result sets may be interleaved in the response stream.

Out of scope

  • All other methods (Session.Query, table.Client, streaming, etc.).
  • If the option is omitted, behavior is unchanged.

Benchmark test
Execute 50 independent SELECT statements within a single query and measure wall time:

  1. Without the new option.
  2. With the new option enabled.

Refactor
Refactor the current implementation to ensure it does not depend on the ConcurrentResultSet option.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions