[Mapserver-users] Slow Mapserver SVG on postgres db

Steve Lime steve.lime at dnr.state.mn.us
Tue Mar 2 18:32:13 PST 2004


PostGIS may be more sensitive to some of the inefficiencies in MapServer queries. (A common topic today.) Queries force accessing the data twice, once as part of the initial query and a second time for presentation. Different parts of the feature may be used in each case. In addition it may not be the fact that data is accessed twice, but rather the way the second access happens, Refractions folks would have to comment further. The query builds a list of IDs and then during presentation the features are retrieved by ID. I've got a feeling that this ID-based access is particularly expensive with database sources. It's really fast with shapefiles (which is where MapServer started).

Typically I've not worried about query speed because that's at the end point for a user.

Steve

>>> yuth hor <mofumyke at yahoo.com> 03/02/04 2:59 AM >>>

Hi all,

Again, I need some guidance about the SVG output. I have tested the new SVG output from nightly build and found that the return SVG map was very slow if I use the Postgres db as an input type. The shape file input gives me a better performance in order to generate the SVG map. It has no problem and quite fast if I use postgres/postgis with raster output. Do you have any idea about this?  I have never look into the Mapserver source before, anyone can tell me about the SVG generated process in Mapserver and which module in Mapserver source that use to draw the SVG map? I may take a look that source for better understanding.

 

Some information about my data

-        the layer is quite large, about 10 * 65 Mb. / layer (shp file)

-        After dump the shp layer into Postgres, GIST index was already made.

 

Thank you very much in advanced, I also enclosed my map file with this mail for your perusal.

 

Teerayut  

 

MAP

  NAME 'japan'

 

 

  EXTENT 122.935414 24.040589 153.986285 45.554518

 

  STATUS OFF # we don't want a raster map

  UNITS DD

  SHAPEPATH "/usr/local/apache/htdocs/japan/data/"

 

  WEB

    HEADER '../header.svg'

    FOOTER '../footer.svg'

    QUERYFORMAT 'image/svg+xml'

  END

 

 

 

LAYER

  CONNECTIONTYPE postgis

  NAME "z9_road"

  STATUS DEFAULT

  CONNECTION "user=postgres dbname=gsi2500 host=10.10.10.100 port=5432"

  DATA "the_geom from (select gid,the_geom from z9_road) as foo using unique gid using SRID=4301"

  TYPE QUERY

  HEADER ../z9_road_header.svg

  FOOTER ../z9_road_footer.svg

  TEMPLATE ../z9_road_template.svg

END

 

END

 



---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you're looking for faster.




More information about the MapServer-users mailing list