[postgis-users] Slow Query Times for Split Tiles

Mateusz Łoskot mateusz at loskot.net
Fri Nov 4 13:29:41 PDT 2011


On 4 November 2011 12:50, elliott <elliott at cpi.com> wrote:
> Yes, I am certain that the table has been indexed. If I use the
> raster2pgsql.py script with the -I option to load additional data, it
> complains that the table is already indexed.
>
>  Querying for 10,000 lat/lons on locations that have not been imported into
> the database is very fast returning in 2 seconds.   It can very quickly
> determine that there are no intersections.  However, when there are
> intersections for all 10,000 lat/lons, the query is taking over 2 minutes.

Do you store rasters in- or out-database?
Anyway, query itself is fast, I'm sure. But deserialization of 10000
rasters to find and
fetch value of single pixel, that sounds expansive on its own.
Try to imagine, or prototype it with GDAL and Python, opening 10000
.tif files, one by one
and RasterIO'ing value of pixel.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org



More information about the postgis-users mailing list