[postgis-users] Re: [mapserver-users] MapServer Performance

Paul Ramsey pramsey at refractions.net
Fri Nov 22 00:02:40 EST 2002


> The way I'm doing it is:
> 
> 1.- I first obtain the data (reading from a file) from which the set of 
> features will be classified.
> 2.- Then I add a column to that table to hold the data for that
> classification and request (so that multiple requests can be handled at
> the same time).
> 3.- Then I update that column of the PostGIS table to hold the data for that
> particular classification from the data obtained in step 1.
> 4.- Then I add the layers with PHPMapscript using expressions (something
> like: ([DATA_USER] >= $class[$i] AND [DATA_USER] < $class[$i+1]) ) to the mapObj.
> 5.- Then I draw the map.

Check out some of Jan's postings in the past regarding doing 
classification on the fly from PostGIS. One of the keys to good 
performance is pushing the calculations back into the database. So 
rather than adding X classes with expressions in them, do the 
classification in the db with a CASE expression and simplify the class 
expressions down the a CLASSITEM and a simple match (EXPRESSION "blah").

Also I do not entirely understand what is going on in steps 1 and 2. You 
are adding to the db for every query?

Finally, you do not need views necessarily since you can now form a DATA 
statement out of arbitrary SQL. I am afraid we still do not have a 
comprehensive guide on this topic yet... sorry.

P.





More information about the mapserver-users mailing list