M.-A. Lemburg mal at
Thu Feb 7 17:21:27 CET 2008

On 2008-02-07 16:46, Carsten Haese wrote:
> On Thu, 2008-02-07 at 16:33 +0100, M.-A. Lemburg wrote:
>> mxODBC has support for named cursors that you can later
>> use for positioned updates. 
> Since we're on the topic of shameless plugs, InformixDB has this
> feature, too :)
>> However, it's usually better to do updates in the classical
>> way, ie. by referencing a primary key.
> That depends on the notion of "better". It's entirely possible that a
> "WHERE CURRENT OF <cursor>" clause finds the row in question faster than
> even an indexed access using a primary key could. If you're processing a
> single row, I would agree that using an update cursor is overkill, but
> if you're processing a large number of rows, using an update cursor
> might be beneficial.


This approach is also very useful if you have to do extra analysis
of the rows in question *outside* the database, before selecting them
for update.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Feb 07 2008)
>>> Python/Zope Consulting and Support ...
>>> mxODBC.Zope.Database.Adapter ...   
>>> mxODBC, mxDateTime, mxTextTools ...

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the Python-list mailing list