[Zope-DB] Parametric queries
Greg Fischer
retheoff at gmail.com
Fri Jul 29 15:40:13 EDT 2005
Yeah, for my purposes, ZSQL Methods have been totally adequate, if not
perfect. I have not seen any performance issues, even if they have
that 40% overhead. Actually, the only thing that is slow is running
very large reports, but you cant really get around that when you call
up thousands of records in one shot. (or can you?) Of course, I only
have my apps running with 60-70 users, so I cant speak for those
running at high capacity. I would just use the already built zope
machinery instead of dealing with all that yourself, if you can help
it.
Also (and I am quite ignorant when it comes to the details on db
connections), if you are concerned about caching and the performance
of your queries, I am guessing you might be running several queries in
one operation. If so, wouldnt the use of stored procedures help with
that? That would reduce the connection overhead and I think the
parameters you spoke of could be used, right? Although, it is still
just building the sql command from zope. Just a thought I had. I use
procedures as much as possible and in my experience it really helps
performance.
Anyway, just thought I'd throw my 2 cents out there. I could be way
off on this.
Greg
On 7/28/05, Marcin Wudarczyk <mar at mar.prv.pl> wrote:
>
> Hello,
>
> I've read the manual for Z SQL method and set up a simple example with
> query having a parameter. Everything works fine but then I realised that
> parametric Z SQL Methods are not passing its parameters to DB as
> parameters but inserting it into SQL string. I think this has
> significant impact on perfomance - DBs have special facilities to cache
> compiled queries and change only parameters. Is there a way to use this
> features from Zope?
>
> (I understand that I can manually make queries via DB-API, but I loose
> sync with Zope transactions? Anyway I would prefer to use Z SQL Methods)
>
> Regards
>
> Marcin Wudarczyk
>
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB at zope.org
> http://mail.zope.org/mailman/listinfo/zope-db
>
--
Greg Fischer
1st Byte Solutions
http://www.1stbyte.com
More information about the Zope-DB
mailing list