The problem wasn't the indexes (they're already there) but the use of
the following:
DATA the_geom from (select * from my_table where year='mean') as foo
using unique gid
where my_table contains millions of rows and the 'mean' filtered rows
are the actual features I want (a couple of thousands).
On 29/12/2009 18:57, G. Allegri wrote:
> I'm using a polygonal postgis layer, composed of simple rectangular
> cells (a grid). I'm quite worried by the performances in rendering
> search results in map.php->pmap_addResultLayer(). I've profiled a
> search query which returns 380 grids/polygons, and