ydb-go-sdk
ydb-go-sdk copied to clipboard
feat: Add concurrent result set materialization for driver.Query().Query(...)
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:
- Without the new option.
- With the new option enabled.
Refactor
Refactor the current implementation to ensure it does not depend on the ConcurrentResultSet option.
Hello @kprokopenko ! I’d like to take this issue as my coursework project. I’ll implement the ConcurrentResultSets option and perform the required benchmarks.