[Zope-DB] Re: Example for RDB persistency in zope products?

Charlie Clark charlie at egenix.com
Sat Jun 26 08:03:41 EDT 2004

On 2004-06-26 at 12:07:00 [+0200], Nick Bower <nicholas.bower at jrc.it> wrote:
> Thanks, but part of the reason I was wanting to avoid ZSQL is because
> (for whatever reason) I've been unable to get any decent performance
> using TTW+ZSQL components in a ZEO environment.  ZPT benchmarks fine,
> but add some ZSQL and you're hosed!

I'm pretty certain the ZEO confuses the DA somehow, ZSQL is slow but not 
that slow.

> So why would someone want the overhead of DTML parsing in business logic
> when I can directly pass SQL statements the the DA?  (in my very limited
> understanding - correct me if I'm wrong here).

DTML parsing is pretty fast but passing the SQL statements as strings is 
slow when compared with passing positional parameters - you'll get at least 
30% speed up if you do this.

It is possible with some DAs to access their .execute methods directly in 
an ExternalMethod. This is certainly the case with the mxODBCZopeDA and 
this allows you. Please see my mail to the list on this a while back. I'm 
not sure if you can do this with the ZpsycopgDA so you might want to gives 
ours a try assuming you have an ODBC manager around.

> Yes, I did think I would be locking myself to the database adapter being
> used, but having a loadable application locked to a single database is
> better than having an un-loadable application.  (Assuming my reasons for
> assuming ditching ZSQL will lead to better performance).
> Do these thoughts match with anyone's experiences?

There is lots of room for improvement in Zope and RDBMS - it hasn't really 
been necessary for ZC so far which is why things have stayed the way they 
are. We will be introducing support for positional parameters probably in 
the next release of the mxODBCZopeDA and would like to work on other parts 
of the system to improve performance and usability. What's the best way to 
go about this? Move the discussion to zope-dev? Thoughts welcome.

Charlie Clark

Professional Python Services directly from the Source
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
-------------- next part --------------
An embedded message was scrubbed...
From: Charlie Clark <charlie at egenix.com>
Subject: [Zope-DB] Re: [egenix-users] Permission woes
Date: Tue, 06 Apr 2004 16:25:12 +0200
Size: 5923
Url: http://mail.zope.org/pipermail/zope-db/attachments/20040626/5790db7c/Zope-DBRe_egenix-usersPermissionwoes_20040406162539_369.eml

More information about the Zope-DB mailing list