[postgis-users] Qgis + PostGis. Low operating speed.

Regina Obe lr at pcorp.us
Mon Dec 12 20:45:16 PST 2022

PostGIS raster sadly doesn’t use the pyramids in the Tifs.  Or if it does no one told me.


You should build raster overviews using the raster2pgsql –l switch. 



Doc example is this which builds a level 2 and 4 pyramid
raster2pgsql -I -C -e -Y -F -s 26986 -t 128x128  -l 2,4 bostonaerials2008/*.jpg aerials.boston | psql -U postgres -d gisdb -h localhost -p 5432


QGIS knows how to use the overviews built that way and should be much faster to view in QGIS


raster2pgsql -s 4326 -t 256x256 -C -I -F "d:\Temp\060 tiff\res\OCG_t1.tif" OCG_t1 -R| psql. 



From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Alex German
Sent: Monday, December 12, 2022 11:34 PM
To: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Subject: [postgis-users] Qgis + PostGis. Low operating speed.


Hello everyone!

I have a GeoTIFF. 

I built the pyramids in an external file using GDAL 

"gdaladdo d:\Temp\060 tiff\res\t1.tif -r lanczos -ro 2 4 8 16 32 64 128 256 512. 

Uploaded to PostGIS using 

raster2pgsql -s 4326 -t 256x256 -C -I -F "d:\Temp\060 tiff\res\OCG_t1.tif" OCG_t1 -R| psql. 

The number of files is more than 1000. 

When trying to load tables in QGis, the loading is very slow. 

At the same time, downloading to QGis from files is fast. Question. What is not configured correctly and how to speed up the download to Qgis from PostGIS?



Alex German


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20221212/af871a8f/attachment.htm>

More information about the postgis-users mailing list