Closed zachkinstner closed 11 years ago
What happens if something goes wrong with a query execution and breaks the client/connection? Once issue #6 is complete, a command failure would short-circuit the request. The final rollback/close queries should share a new client/connection, to avoid potential corruption caused by the command error.
I have implemented this as a fix for #14. Each request gets a single [SessionContext] instance, and now, each SessionContext maintains a single [RexConnectClient]. The client is closed at the end of the request.
The performance gain here is noticeable, but I don't have proper measurements. I'd say it's on the order of 10 to 20% faster for my batch operations in #14.
From issue #7:
To avoid overhead of creating a new client and connection for each command, move the client up to the request level.