Anything you can do in the data definition limits the number of features sent 
over the network, so that's preferable. Class expressions are generally used to 
sort features you want to draw differently.

Steve

From: [email protected] 
[mailto:[email protected]] On Behalf Of Travis Kirstine
Sent: Friday, February 07, 2014 9:51 AM
To: [email protected]
Subject: [mapserver-users] PostGIS Data Query vs Expression

What is the best practice for using selecting data with a where clause in 
MapServer using PostGIS connection

i.e.

DATA "the_geom from (SELECT gid, the_geom FROM audience_table WHERE audience = 
'Farmers') as foo using unique gid using SRID=4326"

OR

DATA "the_geom from audience_table using SRID=4326"

with a class expression

CLASSITEM audience
....
EXPRESSION 'Farmer'

Thanks

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to