[redland-dev] MySQL storage engine should use persistent connections
mof-rdf at mfd-consult.dk
Fri May 6 13:29:41 BST 2005
I've created an issue  in the issue tracker and attached a patch to it:
#27: MySQL storage engine should use persistent connections
As released, the MySQL storage engine opens a new connection for each query it
sends to the MySQL server.
This was originally done to avoid problems with deadlocks and nested queries,
but turns out to have a negative impact on performance, especielly since
rasqal has entered the scene.
The attached patch makes the engine maintain a growing list of connections
instead, and reuses them where possible.
The connections should be automagically maintained by the mysql client library
in case the server terminates one because of a timeout, and while the number
of simultaneous connections will not increase with this patch, the duration
of the connections is extended.
crschmidt has been kind enough to test it as well, and found no problems with
it, but I'd be happy to receive comments on the viability in general use.
Related to this was a request  for the Perl bindings to use DBI, to make it
possible to share persistent connections when running under Apache. I don't
see how that's possible, and also don't want to spend time investigating it,
but feel free to go ahead and try. :-)
More information about the redland-dev