[Zope] PyGreSQLDA

Kapil Thangavelu kthangavelu@earthlink.net
Tue, 26 Sep 2000 13:53:50 -0700


"Leichtman, David J" wrote:
> 
> Has anyone had significant speed issues using the PyGreSQLDA? It seems like
> I'm only getting one DB connection at a time. Is this an issue with the DA,
> with Zope, or am I doing something wrong? I have a pgsql db running just
> fine, and in Zope I have a connection instantiated at the top level that all
> of my ZSQL methods use. Shouldn't it still be able to establish multiple
> connections, though? I guess I'm confused as to how it works. Thought I was
> using it right, but if I execute a query through Zope it takes a few
> milliseconds unhindered. However, if multiple people try to run a query at
> the same time, it usually takes a few seconds, as if only one person were
> connected at a time.
> 
> I'd love elucidation from someone educated on this subject, as I am most
> certainly not :)

ZPYGre is not threadsafe, so with it and all non-threadsafe da's zope
uses a lock around access. (Thunked.py)

The solution is to just use multiple DA connections and let postgres
sort out the concurrency issues.


Cheers

Kapil