Re: [QGIS-Developer] QGIS "fast" mode

2020-03-20 Thread Alessandro Pasotti
On Fri, Mar 20, 2020 at 9:08 AM Julien Cabieces wrote: > > > Hi, > > > Hi, can someone explain what is the real logic currently coded for trust > > option? > > It calls the QgsProject::setTrustLayerMetaData(bool) which says > > > Sets the trust option allowing to indicate if the extent has to be

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-20 Thread Julien Cabieces
Hi, > Hi, can someone explain what is the real logic currently coded for trust > option? It calls the QgsProject::setTrustLayerMetaData(bool) which says > Sets the trust option allowing to indicate if the extent has to be read from > the XML document when data source has no metadata or if

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-20 Thread René-Luc Dhont
Hi Régis, The trust option is used in QgProject with QgsVectorLayer::setReadExtentFromXml https://github.com/qgis/QGIS/blob/master/src/core/qgsproject.cpp#L3304 Then in the case of a postgres layer, the checkUnicityKey is disabled

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-19 Thread Régis Haubourg
Hi, can someone explain what is the real logic currently coded for trust option? It feels like this topic raises again each year for 5 years now, and we have regressions and what it is supposed to do. It was funded at start to not check at all any metadata on the datasource and read only qgs

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-19 Thread René-Luc Dhont
Hi Tomas, The way trust option works is not enough for big databases and big project with more than 100 layers. It is what Michaël and I experiment. Then the problem with changes data is more about the layer extent. For example a natural observations layer is designed to accept data on a

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-18 Thread Tomas Straupis
2020-03-18, tr, 21:41 kimaidou rašė: > # only few requests are avoided as you pointed out so the performance > improves "only" a bit In large databases those few requests take minutes and sometimes even hours... For servers even 30 seconds are too much when you're trying to add a new QGIS

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-18 Thread kimaidou
Hi all Thanks for raising this issue and for your proposal of patch. I agree with you that in many cases, completely trusting the project for columns, srid, and all other things needed by Qgis would improve performances a lot in project loading, and for Qgis server getcapabilities requests. I do

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-17 Thread Julien Cabieces
Hi > If I understand correctly, I can change my patch to skip geometry > type and srid check when they are saved in project already and when > option "trust project" is switched on? > (https://github.com/qgis/QGIS/pull/34738) Yes, I think it looks like the appropriate way of doing it

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-16 Thread Tomas Straupis
2020-03-16, pr, 10:48 Julien Cabieces rašė: > This function is only for PostGres (Tomas use an Oracle database if I > remember correctly). Actually I use PostgreSQL more, but this particular performance problem is with Oracle database. And if enough people agree with the principle, I think it

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-16 Thread Julien Cabieces
Hi all, This function is only for PostGres (Tomas use an Oracle database if I remember correctly). And from what I inderstand from the code, It only prevents from checking for unique colomn in a view or materialized view. However, it looks the good option to deal with this use case, I mean no

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-14 Thread Tomas Straupis
2020-03-14, št, 13:58 Régis Haubourg rašė: > Check the project property option named "trust". This is exactly what it is > supposed to do. > I admit the wording is not nice, any better idea is welcome. You mean this one: "Trust project when data source has no metadata"? I read the wording

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-14 Thread Richard Duivenvoorde
Hi, Related: having projects with several WMS or WFS server layers also are opening very slowly (even when NOT visible). It would be nice to have 'lazy' loading, so only load layer which are visible? @Tomas: are you sure it is doing full table scans? Most database have some 'metadata' or cached

Re: [QGIS-Developer] QGIS "fast" mode

2020-03-14 Thread Régis Haubourg
Hi Tomas. Check the project property option named "trust". This is exactly what it is supposed to do. I admit the wording is not nice, any better idea is welcome. Best regards Le sam. 14 mars 2020 à 12:55, Tomas Straupis a écrit : > Hello > > I would like to know opinion of QGIS developer

[QGIS-Developer] QGIS "fast" mode

2020-03-14 Thread Tomas Straupis
Hello I would like to know opinion of QGIS developer community on the question of "self-fixing queries" in the context of database layers. When you add a new database layer, QGIS queries required data, asks user for other information and then saves it in the project file. Now when you