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-boun...@postgis.refractions.net [mailto:postgis-users- > boun...@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@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 > > > > _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users