[postgis-users] optimize query
Pierre Racine
Pierre.Racine at sbf.ulaval.ca
Tue May 22 14:22:21 PDT 2012
Is your raster tiled? How?
Is it indexed?
Does your query actually use the index?
It is maybe not a good idea to get the srid for ST_Intersects from the raster. Try to hardcode it to see if it makes a difference.
Pierre
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of Gold, Jack L (US SSA)
> Sent: Tuesday, May 22, 2012 5:17 PM
> To: PostGIS Users Discussion (postgis-users at postgis.refractions.net)
> 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
>
>
>
>
More information about the postgis-users
mailing list