Connection pool
Clear uses connection pooling to allow multiple transactions to run in parallel over multiple fibers.
By default, each connection is fetched from the connection pool for each fibers. Let's see this example:
Each call to SQL is using a new connection, from the free connection pool; if a transaction is in progress, each call will use the same connection during the whole transaction.
If all the connections are busy, the fiber will wait indefinitely until a new connection is freed.
There is currently no way to force a fiber to use the same connection has another fiber. This may be improved in the future.
Last updated