Re: [postgis-users] ST_value slow

2017-02-04 Thread J Payne
Hi Rémi, My query was: UPDATE hourly_positions hp SET landform = (SELECT ST_Value(rast,hp.geom4326) FROM landforms4326_128 lf where (lf.rast && hp.geom4326) AND ST_Intersects(lf.rast,hp.geom4326)) You wrote: “your update is not safe because a point may intersect several tiles.”  I’d

Re: [postgis-users] ST_value slow

2017-02-04 Thread J Payne
Hi Rémi, Thanks for the suggestion.  I tiled the raster and added a ST_Intersects, and the whole operation finished in just a couple of minutes (the previous version hadn’t completed when I left it running overnight).  The command I used was this: UPDATE hourly_positions hp SET landform

Re: [postgis-users] ST_value slow

2017-02-04 Thread Rémi Cura
Hey, I suppose your raster is correctly cut into small pieces. You should first try to clock one point value retrieval. It should be < 50ms (or you have an index issue) Then you could force the use of index by writting a function update_one_point(point) $$ update XXX set XXX WHERE