[postgis-users] How to speed up this query using Spatial Index in PostGIS?
Guo YU
yuguo365 at gmail.com
Thu Jul 11 08:01:31 PDT 2013
I have put the Tiled Global DTM into PostGIS. It has around 1 million rows.
So, when I search for the specific raster data for my interested area
(polygon), it takes almost 1 minutes to get the result. The SQL I were
using is as follows:
SELECT rast
FROM globaldtm
WHERE ST_Intersects(rast,ST_envelope( (select geometry from polygons
where id =25)));
I knew there is a way to speed up this query by using spatial index. But I
don't know how to get it work. Can I build my own index like creating index
according to the UTM zone.
Does anyone have some good example about that? Thanks.
--
*YU Guo
*
MSc. Hydroinformatics and Water Management
*Email*: *yuguo365 at gmail.com*
*Phone*: +33 668 195803
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130711/0b845806/attachment.html>
More information about the postgis-users
mailing list