[QGIS-Developer] PostGIS Raster loading extrem long in QGIS 3.16 and 3.22

Alessandro Pasotti apasotti at gmail.com
Tue Mar 15 10:53:54 PDT 2022


Hi,

the reason for the different behavior is that the old QGIS version was
using GDAL to access PG rasters while the new versions uses a QGIS native
data provider which is using ST_SummaryStatsAgg() to calculate statistics,
I believe that this call can become very slow on large rasters and we
should probably reduce the time by using a smaller sample size but this has
to be implemented/fixed yet, feel free to file a ticket on the QGIS bug
tracker.

The good news is the you can still load the raster from QGIS using the GDAL
provider with a connection string that looks like this:  "PG:
dbname={dbname} mode=2 host={host} port={port} table={table}
schema={schema} sslmode=disable"

Hope this helps.

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220315/1905dc86/attachment.html>


More information about the QGIS-Developer mailing list