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 check (geometry type, srid, key column...) as soon as this option is set. Regards, Julien > 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 <tomasstrau...@gmail.com> a > écrit : > >> 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 re-open the project, QGIS is re-querying a lot of data >> which is already saved in the project: geometry type, srid, attributes >> (table columns/types). >> The downsides are: >> * these "re-checking" queries take considerable time on large >> databases: with millions of records from 1minute up to several hours, >> database is tuned - WMS/WFS queries finish in ~100ms. >> * in QGIS server environment these re-checking queries are executed >> each time when apache launches a new QGIS server process >> * QGIS might by itself (without human interaction) decide to work >> differently compared to what it was asked to do when the project was >> created if it finds that "something has changed" >> * re-checking during project opening is not 100% correct, as if >> changes are possible in principle, then data/schema could change >> during the time QGIS (Desktop/Server) is open/running >> * in environments other than development (testing, qa, production), >> database schema should never change without some clear procedure which >> should also include updating QGIS project files and testing them as >> required, therefore such re-checkings should never be required on >> testing/production environments. >> >> I do understand that the current situation/understanding is >> different from mine, so in order to satisfy everybody, maybe it would >> be feasible to add say an environment variable like QGIS_FAST=TRUE (or >> QGIS_PRODUCTION=TRUE) and if this is set - re-checking queries could >> be skipped? We've been running modified QGIS without re-checking in >> production for months and are very happy with results. This should >> also improve the benchmarks of QGIS Server as it is known that initial >> opening of the project takes considerable amount of time. >> >> What is your opinion? >> >> Thank you >> >> -- >> Tomas >> _______________________________________________ >> QGIS-Developer mailing list >> QGIS-Developer@lists.osgeo.org >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer > _______________________________________________ > QGIS-Developer mailing list > QGIS-Developer@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer _______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer