Method GenerateDrivenStreamsSelect(IReadOnlyList<FieldInfo>, string, string, string, IReadOnlyList<string>?)
The bare SELECT of the streams source driven by the rows of an open CTE that exposes the object id as
_id: one row per row of it, for a caller that writes its own "( ... ) alias" around it. A window reads the
fields it only shows this way, for the rows it keeps (win), with its own columns carried along in
driverColumns: a join of the window rows to a separate subquery of the fields had no index
and compared every row with every row (15 thousand rows: 13 s against 0.5). Fenced by LIMIT -1 as over a tree.
public string GenerateDrivenStreamsSelect(IReadOnlyList<FieldInfo> fields, string schemeIdParam, string drivingCte, string indent, IReadOnlyList<string>? driverColumns = null)