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

Nyall Dawson nyall.dawson at gmail.com
Fri Nov 27 14:42:13 PST 2015


On 27 Nov 2015 10:18 PM, "Janneke van Dijk" <janneke.qgis at gmail.com> wrote:
>
> Dear list,
>
> I have an updateable spatial view in Postgres loaded into QGIS 2.10. When
I update 6999 records in this view in the db manager with the following
statement:
> update v_prepare_assessment_id SET districtid = 8 where locationid >
13000 and locationid < 20000
> it takes 2.7 seconds to complete.
>
> When I open the attribute table, select the same records, then use the
update bar in the top to update the districtid to 8, using 'update
selected' , then save edits, it takes more than 10 minutes (after which I
closed the project).
>
> Doing the same update directly on the attribute table of the underlying
postgres table works nicely (takes about 3 seconds) after save edits.
>
> Does anyone know why the update via the attribute table on the view takes
so long as to be unusable, while the db manager works nicely with the view?
Seeing that working directly on the underlying table from the attribute
table works well too it's seems to be a combination of the attribute table
approach with an updateable view that seems to cause the issue.
>
> Thanks for any thoughts on the matter,

Please try with 2.12.1 or the current nightly snapshots.

I made a change since 2.12 which may have improved this already.

Nyall
>
> Janneke
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20151128/ad291df0/attachment.html>


More information about the Qgis-user mailing list