[Zope-DB] Re: Typical size of result sets
Charlie Clark
charlie at egenix.com
Wed Jan 19 04:34:52 EST 2005
On 2005-01-19 at 10:30:43 [+0100], Chris Withers <chris at simplistix.co.uk>
wrote:
> Wolfram Kraus wrote:
> > From the Python Database API Specification v2.0
> > (http://python.org/peps/pep-0249.html):
> >
> > paramstyle
> >
> > String constant stating the type of parameter marker
> > formatting expected by the interface. Possible values are
> > [2]:
> >
> > 'qmark' Question mark style,
> > e.g. '...WHERE name=?'
> > 'numeric' Numeric, positional style,
> > e.g. '...WHERE name=:1'
> > 'named' Named style,
> > e.g. '...WHERE name=:name'
> > 'format' ANSI C printf format codes,
> > e.g. '...WHERE name=%s'
> > 'pyformat' Python extended format codes,
> > e.g. '...WHERE name=%(name)s'
> > [2] Module implementors should prefer 'numeric', 'named' or
> > 'pyformat' over the other formats because these offer more
> > clarity and flexibility.
>
> Wow, I've never seen this before in my life :-)
>
> How does it relate to ZSQL methods?
Easy: going away from <dtml-sqlvar> to some kind of positional parameter
brings immense performance improvements (40% on non-cached queries).
Charlie
--
Charlie Clark
eGenix.com
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 ! ::::
More information about the Zope-DB
mailing list