Open
Description
Firebird currently requires explicit transaction starts from client to server, which require one network roundtrip to start a transaction. A lot of competitors use implicit transaction starts, which reduces network overhead.
My initial proposal for implicit transaction starts has the following components:
- A connection has a default transaction handle (e.g. some constant that is the same for all connections, either a low number (e.g.
0
or1
), or very high) - The default transaction handle (or connection) has a "transaction configuration", which defaults to read write/wait/snapshot (the default of
SET TRANSACTION
without any clauses) - This default configuration can be configured in some way (new op-code, or maybe we can do something special with
op_transaction
?) - Passing the default transaction handle with an operation will do one of the following (server-side!)
- no current transaction: start one with the current "transaction configuration" and associate it with the handle
- active transaction: use it (same as with normal transaction handles)
- prepared transaction: raise error (same as with normal transaction handles)
- Commit/prepare/rollback will behave as normal
In this design, explicit transaction starts are still possible, as are multiple parallel transactions.