[Zope] SLQ-connection Pooling
Bo M. Maryniuck
b.maryniuk@forbis.lt
Fri, 9 Aug 2002 09:46:10 +0200
On Thursday 08 August 2002 14:39, Dario Lopez-K=C3=A4sten wrote:
> Well, I was thinking of whether it was more efficient to connect to the=
DB
> server from the ExtMethod using the existing DA-connection object, or i=
f it
> was more efficient to just do a per-request connect-disconnect directly=
in
> the ExtMethod.
Well, if you would like to use "connect-disconnect" way, you should close=
the=20
connection. Oracle also have a timeout and drops any the connection, but =
how=20
it works in case of Zope I still don't know exactly and can't you help he=
re.=20
It is better to ask Matt, who has developed the DCOracle.
What I think, is ExternalMethod is not exactly correct or so. Also I've=20
developed a Unix daemon for Oracle, using Python. And all the time I stil=
l=20
have a problem with _starting_ this module: DCOracle2 module takes a long=
=20
time to load. It is not that long time for module which is started once p=
er=20
system boot, but in your case it IS that long for the process which shoul=
d be=20
loaded as quickly is possible... OTOH, you also should check your SQL for=
=20
fullscans etc. Maybe it is also Oracle "problem".
Anyway, using ZOracleDA with DCOracle2 and ZSQLMethod seems that we have =
not=20
any troubles with perfomance. For example, Oracle client and Zope is runn=
ing=20
on very old HP box with 10Mb Ethernet P166 / 64M with 66mHz bus and we fe=
tch=20
a lot of data from the Oracle and we have no problem though. OTOH, if you=
r=20
SQL select works same (the speed) with SQL+ and with DCOracle2 (you can c=
heck=20
it by writing a test) so the problem is quite obvious as I've described=20
above.
Concering to me, I'm enforced by whole software strategy to develope the =
way=20
of spool with a lots of temporary connections to the Oracle (why, I'll no=
t=20
describe here) and we really not care about the very perfomance. But in y=
our=20
case it is better to have one persistent connection.
--=20
Sincerely yours, Bogdan M. Maryniuck
=2E.you could spend *all day* customizing the title bar. Believe me. I
speak from experience."
(By Matt Welsh)