[postgis-users] Multiple table join - mapserver

Greg Robillard greg at ecotrust.org
Fri May 19 13:49:13 PDT 2006


I'm using a subselect in my mapfile that uses three tables: 
DATA "the_geom FROM (SELECT akmon_pt.the_geom AS the_geom ,akmon_pt.maid
AS maid,akmon_pt.locid AS locid FROM akmon_pt,i5dbxma , i5maxat where
akmon_pt.maid=i5dbxma.maid and i5maxat.maid=i5dbxma.maid and
i5maxat.atid=1 and i5dbxma.fyear>=1992 and i5dbxma.lyear<=2005 and
i5dbxma.spp=2 and i5dbxma.esu=-363155345) AS foo USING UNIQUE locid
USING SRID=-1"

It causes postgres to eat up all available memory on the machine. If I
execute the above in psql, the record returns instantly. If I attempt to
join only two tables, Mapserver works fine. 

Is this a known limitation? 

Best, 

Greg Robillard
Database Developer
State of the Salmon
greg at ecotrust.org 



More information about the postgis-users mailing list