ydb-go-sdk icon indicating copy to clipboard operation
ydb-go-sdk copied to clipboard

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

Open kprokopenko opened this issue 1 month ago • 1 comments

What to add
Add a single new option for db.Query(ctx, sql, query.WithConcurrentResultSets(true)) that enables option https://github.com/ydb-platform/ydb-go-sdk/blob/c56ab1faed16406fe3fa874aee6f33cd26eb0ce1/internal/query/execute_query.go#L95

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.

kprokopenko avatar Oct 06 '25 16:10 kprokopenko

Hello @kprokopenko ! I’d like to take this issue as my coursework project. I’ll implement the ConcurrentResultSets option and perform the required benchmarks.

Flak34 avatar Oct 07 '25 14:10 Flak34