Hi All,

It is taking twice as long to do a single query for multiple lat/lon pairs ( 10,000 of them ) than to iterate over the pairs and query for each. I would have thought that the single query would be faster.

The queries are as follows:
Called once:

select ST_Value(rast, ST_Transform(ST_SetSRID(ST_Point(s.lon, s.lat), 4326), ST_SRID(rast))) from srtm3 cross join( VALUES (lat1,lon1), (lat2,lon2), (lat3,lon3), ... (lat10000, lon10000) ) as s(lat,lon) where filename='N38E126.hgt';

Called for each lat/lon pair:

select ST_Value(rast, ST_Transform(ST_SetSRID(ST_Point(lon, lat), 4326), ST_SRID(rast))) from srtm3 where filename='N38E126.hgt';


_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to