[Qgis-developer] PostGIS queries slow when in edit mode

Lauri Kajan lauri.kajan at gmail.com
Mon Apr 11 05:43:06 PDT 2016


Hi,

We are getting the same experience as Manuel on 2.14.1 and we are using
only standard relations.
Feature forms open instantly when not in edit mode and takes 10 seconds
when edit mode is toggled on.

-Lauri


On Mon, Apr 11, 2016 at 11:47 AM, Bernhard Ströbl <bernhard.stroebl at jena.de>
wrote:

> Hi Manuel,
>
> instead of developping a new plugin my plugin DataDrivenInputMask [1]
> might suit your needs. It handles all kinds of relations and referential
> integrity out of the box (if thoroughly defined in the DB). Tickets,
> feedback, feature requests welcome.
>
> Bernhard
>
> [1] http://plugins.qgis.org/plugins/DataDrivenInputMask/
>
>
> Am 11.04.2016 um 10:30 schrieb Manuel Hernández Martínez:
>
>> Hi, Andreas, thanks for your help.
>> We tried the built-in relation support, combined with the edit widgets
>> and form view. Is that what you mean? Powerful features as they are, they
>> don’t fit our needs, however. There are quite a few tables, with two-level
>> relationships; the generated forms and the workflow using the built-in
>> solution is still too complex for our digitizers daily work. We also had
>> doubts regarding to how to handle referential integrity constraints in edit
>> mode. That’s why we finally decided to build our own plugin.
>> In any case, I have taken a look at it again; it feels somewhat slower
>> than our solution when not editing, and roughly the same in edit mode (no
>> measures, though, just my first subjective impressions).
>>
>> De: Neumann, Andreas [mailto:a.neumann at carto.net]
>> Enviado el: viernes, 08 de abril de 2016 16:02
>> Para: Manuel Hernández Martínez
>> CC: 'qgis-developer at lists.osgeo.org'
>> Asunto: Re: [Qgis-developer] PostGIS queries slow when in edit mode
>>
>>
>> Hi Manuel,
>>
>> QGIS already has built-in relation support (1:n and n:m) - they should
>> support server side queries. Do you really need to write your own plugin?
>> Are the built-in relations not good enough?
>>
>> Andreas
>>
>> On 2016-04-08 15:26, Manuel Hernández Martínez wrote:
>> Hi!
>> I'm developing a plugin for QGIS. When the user selects a feature, it
>> queries a few other layers from Postgis to fill in a form with related data.
>> The queries are slow, unless I check the option to run queries
>> server-side. After that, the queries run instantaneously. Yay!
>> However, if the layers are put in edit mode, the queries are slow again!
>> :(
>> After checking the Postgis logs it seems that the run queries server-side
>> option has no effect when the layers are in edit mode.
>> Does anyone know whether it is a known, well-founded limitation or a bug?
>>
>> Regards, Manuel
>>
>> ________________________________
>> Manuel Hernández Martínez
>> mhernandezm at agenciamedioambienteyagua.es<mailto:
>> mhernandezm at agenciamedioambienteyagua.es>
>>
>> Agencia de Medio Ambiente y Agua de Andalucía.
>> http://www.agenciamedioambienteyagua.es<
>> http://www.agenciamedioambienteyagua.es/>
>> Subdirección de Tecnologías de la Información.
>> Red de Información Ambiental de Andalucía, REDIAM.
>>
>> Johan G. Gutenberg, 1. Isla de la Cartuja
>>
>> 41092 - SEVILLA, Sevilla. (Spain)
>>
>>
>>
>> Tel:
>>
>> +34 955 26 00 00 / +34 902 52 51 00
>>
>> Fax:
>>
>> +34 955 04 46 10
>>
>>
>>
>>
>>
>> En la medida de lo posible, evite imprimir este correo.
>>
>> Este correo electrónico y los documentos que en él se puedan adjuntar,
>> contiene información de carácter confidencial dirigida exclusivamente a
>> su/s destinatario/s. Si Usted no es el destinatario de este mensaje, le
>> ruego que lo destruya sin hacer copia digital o física, comunicando por
>> correo electrónico, fax o teléfono a la Agencia de Medio Ambiente y Agua de
>> Andalucía la recepción del mismo. Así mismo, queda expresamente prohibida
>> su divulgación, copia o distribución a terceros sin la previa autorización
>> escrita de la Agencia de Medio Ambiente y Agua de Andalucía.
>>
>>
>>
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org<mailto:Qgis-developer at lists.osgeo.org>
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>>
>>
>>
>> Hi, Andreas, thanks for your help.
>>
>> We tried the built-in relation support, combined with the edit widgets
>> and form view. Is that what you mean? Powerful features as they are,
>> they don’t fit our needs, however. There are quite a few tables, with
>> two-level relationships; the generated forms and the workflow using the
>> built-in solution is still too complex for our digitizers daily work. We
>> also had doubts regarding to how to handle referential integrity
>> constraints in edit mode. That’s why we finally decided to build our own
>> plugin.
>>
>> In any case, I have taken a look at it again; it feels somewhat slower
>> than our solution when not editing, and roughly the same in edit mode
>> (no measures, though, just my first subjective impressions).
>>
>> *De:*Neumann, Andreas [mailto:a.neumann at carto.net]
>> *Enviado el:* viernes, 08 de abril de 2016 16:02
>> *Para:* Manuel Hernández Martínez
>> *CC:* 'qgis-developer at lists.osgeo.org'
>> *Asunto:* Re: [Qgis-developer] PostGIS queries slow when in edit mode
>>
>> Hi Manuel,
>>
>> QGIS already has built-in relation support (1:n and n:m) - they should
>> support server side queries. Do you really need to write your own
>> plugin? Are the built-in relations not good enough?
>>
>> Andreas
>>
>> On 2016-04-08 15:26, Manuel Hernández Martínez wrote:
>>
>>     Hi!
>>
>>     I'm developing a plugin for QGIS. When the user selects a feature,
>>     it queries a few other layers from Postgis to fill in a form with
>>     related data.
>>
>>     The queries are slow, unless I check the option to run queries
>>     server-side. After that, the queries run instantaneously. Yay!
>>
>>     However, if the layers are put in edit mode, the queries are slow
>>     again! :(
>>
>>     After checking the Postgis logs it seems that the run queries
>>     server-side option has no effect when the layers are in edit mode.
>>
>>     Does anyone know whether it is a known, well-founded limitation or a
>>     bug?
>>
>>     Regards, Manuel
>>
>>
>> ------------------------------------------------------------------------
>>
>>     *Manuel Hernández Martínez*
>>
>>     mhernandezm at agenciamedioambienteyagua.es
>>     <mailto:mhernandezm at agenciamedioambienteyagua.es>
>>
>>     Agencia de Medio Ambiente y Agua de Andalucía.
>>
>>     http://www.agenciamedioambienteyagua.es
>>     <http://www.agenciamedioambienteyagua.es/>
>>
>>     Subdirección de Tecnologías de la Información.
>>
>>     Red de Información Ambiental de Andalucía, REDIAM.
>>
>>     Johan G. Gutenberg, 1. Isla de la Cartuja
>>
>>     41092 - SEVILLA, Sevilla. (Spain)
>>
>>     Tel:
>>
>>
>>
>>     +34 955 26 00 00 / +34 902 52 51 00
>>
>>     Fax:
>>
>>
>>
>>     +34 955 04 46 10
>>
>>
>>
>>     *En la medida de lo posible, evite imprimir este correo. *
>>
>>     Este correo electrónico y los documentos que en él se puedan
>>     adjuntar, contiene información de carácter confidencial dirigida
>>     exclusivamente a su/s destinatario/s. Si Usted no es el destinatario
>>     de este mensaje, le ruego que lo destruya sin hacer copia digital o
>>     física, comunicando por correo electrónico, fax o teléfono a la
>>     Agencia de Medio Ambiente y Agua de Andalucía la recepción del
>>     mismo. Así mismo, queda expresamente prohibida su divulgación, copia
>>     o distribución a terceros sin la previa autorización escrita de la
>>     Agencia de Medio Ambiente y Agua de Andalucía.
>>
>>     _______________________________________________
>>     Qgis-developer mailing list
>>     Qgis-developer at lists.osgeo.org <mailto:Qgis-developer at lists.osgeo.org
>> >
>>     List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>     Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>
> __________ Information from ESET Mail Security, version of virus signature
> database 13315 (20160411) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160411/29969cf4/attachment-0001.html>


More information about the Qgis-developer mailing list