[Zope] pooling database connections

Jason Jones jason_j@countermedia.org
Tue, 10 Aug 1999 14:56:19 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0162_01BEE340.814816F0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

As I understand it, an SQL DB connection is only a single instance of =
the connection, and while I can create other instances with the same id =
in subfolders, I can't at the top level.=20

For a multithreaded database adaptor, I guess this isn't a problem, but =
what about a level 1 or 2 adaptor like the MySQL adaptor? Is there some =
way that I can create several instances of a database connection at the =
root level (pool connections, not connections with separate ids) so that =
SQL methods anywhere in the heirarchy can grab whichever one is =
available? Does zope do this by default and I'm just not aware of it? If =
so, what are the defaults and how can I change them? It seems like this =
would be an easy way to improve database performance, but i didn't see =
it in the docs.

Also, how long is an inactive connection maintained, and is there any =
way to prevent the connection from closing?

Thanks,

Jason Jones
jason_j@countermedia.org

------=_NextPart_000_0162_01BEE340.814816F0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>As I understand it, an SQL DB =
connection is only a=20
single instance of the connection, and while I can create other =
instances with=20
the same id in subfolders, I can't at the top level. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>For a multithreaded database adaptor, I =
guess this=20
isn't a problem, but what about a level 1 or 2 adaptor like the MySQL =
adaptor?=20
Is there some way that I can create several instances of a database =
connection=20
at the root level (pool connections, not connections with separate ids) =
so that=20
SQL methods anywhere in the heirarchy can grab whichever one is =
available? Does=20
zope do this by default and I'm just not aware of it? If so, what are =
the=20
defaults and how can I change them? It seems like this would be an easy =
way to=20
improve database performance, but i didn't see it in the =
docs.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Also, how long is an inactive =
connection=20
maintained, and is there any way to prevent the connection from=20
closing?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Jason Jones</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"mailto:jason_j@countermedia.org">jason_j@countermedia.org</A></FO=
NT></DIV></BODY></HTML>

------=_NextPart_000_0162_01BEE340.814816F0--