[Qgis-user] updating postgres updateable view much slower from attribute table than using db manager

Jürgen E. Fischer jef at norbit.de
Sun Nov 29 11:36:33 PST 2015


Hi Janneke,

On Sun, 29. Nov 2015 at 20:44:54 +0300, Janneke van Dijk wrote:
> Using the field calculator either from the attribute table or from main
> window with the attribute table closed both takes too long to be useful. Not
> the actual calculation, but the saving of the edits.  To be clear: I
> originally used the update expression bar to update the selection, but all
> three methods take too long to save.

That's because - as Matthias already said - the expression are evaluated for
each record and the changed attribute value is temporary stored in QGIS.  When
you commit the changed records are iterated and a separate UPDATE statements is
issued for each record.   And that's what takes long - although an expensive
view contributes to the time each UPDATE needs.

The comment about the attribute table was just because for each change also the
attribute table(s) UI is updated.  So execution might be quicker if there are
no open attribute tables.  But the actual updates should perform the same from
wherever you invoke the feature calculator.


Jürgen

-- 
Jürgen E. Fischer           norBIT GmbH             Tel. +49-4931-918175-31
Dipl.-Inf. (FH)             Rheinstraße 13          Fax. +49-4931-918175-50
Software Engineer           D-26506 Norden             http://www.norbit.de
QGIS release manager (PSC)  Germany                    IRC: jef on FreeNode                         
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20151129/b5daefae/attachment.sig>


More information about the Qgis-user mailing list