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). While this
doesn't hurt the speed of the internal layer rendering (I mean on the
map image creation), performances drop drastically when data are
accessed thorugh layer->getShape / layer->getFeature. That's why I was
confused.

A note: since Mapserver 5.0 layer->getShape is deprecated in favour of
layer-getFeature [1]

have a good day!
giovanni

[1] http://mapserver.org/mapscript/php/index.html#layerobj-class

2009/12/30 Armin Burger <armin.bur...@gmail.com>:
> 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 I've found it takes
>> 17.5-18 seconds to do the foreach loop at lines 797-816 of map.php. Is
>> it normal??? I hope there is a bottleneck I've missed...
>>
>
> check this and see if it speeds up things:
>
> http://postgis.refractions.net/documentation/manual-1.4/ch05.html#id2542540
>
> armin
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to