[postgis-users] optimize query

Greg Williamson gwilliamson39 at yahoo.com
Tue May 22 14:41:04 PDT 2012


Jack --

Try running this prefaced by "EXPLAIN ANALYZE " ... that will let us see what the planner thinks is going. Might be a missing index or something not being cast in a way that postgres can use an index.

HTH,

Greg Williamson




>________________________________
> From: "Gold, Jack L  (US SSA)" <jack.gold at baesystems.com>
>To: "PostGIS Users Discussion (postgis-users at postgis.refractions.net)" <postgis-users at postgis.refractions.net> 
>Sent: Tuesday, May 22, 2012 2:16 PM
>Subject: [postgis-users] optimize query
> 
>
>I’m finding a search query we wrote is running really slow.  Any ideas on how to optimize this better?  Or is this the best I can do?
> 
>SELECT ST_Value(rast, ST_Transform(ST_SetSRID(ST_Point(66.12, 37.32), 4326),ST_SRID(rast))) FROM dted_elevations WHERE ST_Intersects(rast, ST_Transform(ST_SetSRID(ST_Point(66.12, 37.32), 4326), ST_SRID(rast)));
> 
>--Jack Gold
> 
> 
>_______________________________________________
>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