length of filter

Stephen Kelly steve at SJK.NET.AU
Thu Nov 10 03:57:28 EST 2005


Hi, 

Not sure if this will help, can you do a SQL query in the database and just
update a temp field 

Update <table>
Set t_field = 0

Update <table>
Set t_field = 1 
Where id='41216' or id='40445' or id='60101' or id='60411' or id='61022'
or id='61713' or id='60614' or id='60644' or id='61513' or id='61023' or
id='60622'....... 

and then do 

DATA "the_geom from gd_poly_003"
FILTER (t_field = 1

Just a thought. 

Steve

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Gernot Katzlberger
Sent: Thursday, 10 November 2005 6:36 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] length of filter

hi list,
 
i have an mapfile with these parameters (mapserver-version 4.4.0).

DATA "the_geom from gd_poly_003"
FILTER (id='41216' or id='40445' or id='60101' or id='60411' or id='61022'
or id='61713' or id='60614' or id='60644' or id='61513' or id='61023' or
id='60622' or id='60608' or id='60611' or id='60504' or id='61045' or
id='60617' or id='61018' or id='60619' or id='61005' or id='60629' or
id='61511' or id='61047' or id='60655' or id='60624' or id='60633' or
id='60323' or id='60609' or id='61002' or id='61021' or id='60635')

in my application the filter can have up to 2000 differnet "ids" and
therefore 2000 "or" statements. (like "id='XXXXX' or")
with up to 400 "ids" it works perfect, but if I want more "ids" in the
FILTER the mapserver crashes. 
if I execute the sql in postgres (select the_geom from gd_poly_003 where
(id='41216' or id='40445' ....)) it works even with 2000 "or" statements.

is there a limitation of the length of the FILTER in mapserver?

thanks for your help,
gernot



 



More information about the mapserver-users mailing list