[postgis-users] Slow Query Times for Split Tiles

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Tue Nov 1 14:34:33 PDT 2011


Did you check if your query is using the index?

> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of elliott
> Sent: Tuesday, November 01, 2011 4:48 PM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Slow Query Times for Split Tiles
> 
> On 11/1/2011 4:27 PM, Mateusz Łoskot wrote:
> > On 1 November 2011 20:23, elliott<elliott at cpi.com>  wrote:
> >
> >> Should splitting raster files into tiles increase query performance?
> >>
> >> I have a two 1201x1201 raster tiles that were loaded by the following
> >> scripts:
> >>
> >> raster2pgsql.py -a -r N37E126.hgt -F N37E126 -t srtm3 -s 4326
> >> -k1201x1201> srtm.sql psql -f srtm.sql TEST
> >>
> >> raster2pgsql.py -a -r N37E127.hgt -F N37E127 -t srtm3 -s 4327
> >> -k50x50> srtm.sql psql -f srtm.sql TEST
> >>
> >> Querying these raster files appears to produce approximately the same
> >> timing results.  Should the 50x50 have better performance than the
> 1201x1201?
> >> Taking almost 3 minutes to query 10000 points seems to be very slow.
> >>
> > Do you query tiles or points (what points?)?
> >
>          Querying tiles for altitudes at lat/lon pairs.
> > Do you measure itme of only query only or query and raster blob
> > processing/rendering?
> >
>          Time is for query only.
> > What's your actual SQL command?
> >
>          This query is run for 10000 lat/lon pairs -
> 
>          select ST_Value(rast, ST_Transform(ST_SetSRID(ST_Point( lon,lat), 4326),
> ST_SRID(rast))) from srtm3 where filename='filename'
> AND ST_Intersects(rast, ST_Transform(ST_SetSRID(ST_Point(lat,lon),
> 4326), ST_SRID(rast)));
> > Best regards,
> >
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


More information about the postgis-users mailing list