Is your feature request related to a problem? Please describe.
On a high latency connections every additional roundtrip between client and server is undesirable. Conn.BeginTx starts transaction by Conn.Execing BEGIN command, which internally waits for result. This wait time is a wasteful and app can't do much about it.
Describe the solution you'd like
Delay BEGIN and sendit it together with first query in transaction, essentially making it lazy. Alternatively utilize Pipeline/Batch to send it in BeginTx, but don't wait for it's result until first query in transaction is issued.
Describe alternatives you've considered
App can chose to use Batch and manually roll BEGIN/COMMIT into the batch, but then it loses convenience of Tx API.
Is your feature request related to a problem? Please describe.
On a high latency connections every additional roundtrip between client and server is undesirable.
Conn.BeginTxstarts transaction byConn.ExecingBEGINcommand, which internally waits for result. This wait time is a wasteful and app can't do much about it.Describe the solution you'd like
Delay
BEGINand sendit it together with first query in transaction, essentially making it lazy. Alternatively utilize Pipeline/Batch to send it inBeginTx, but don't wait for it's result until first query in transaction is issued.Describe alternatives you've considered
App can chose to use Batch and manually roll
BEGIN/COMMITinto the batch, but then it loses convenience ofTxAPI.