[mapserver-users] Layer based on a view renders faster than if based on a table

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Fri Dec 4 15:35:18 EST 2009


Hi,
I have a layer that renders faster when DATA is defined on a view than on 
a table with a clustered index.

Here is the layer definition
  CONNECTIONTYPE postgis
  CONNECTION "host=xxxx dbname=xx user=xx password=xx port=5432"
  DATA "geom900913 FROM prevalence using unique id using srid=900913"
  PROCESSING "CLOSE_CONNECTION=DEFER"
  PROJECTION
    "init=epsg:900913"
  END

My MAP projection is also 900913

If prevalence is a
Postgis View: 0.469s (2.6 seconds in OpenLayers)
Postgis table: 0.781s (3.6 seconds in OpenLayers)
Postgis table+index+cluster: 0.782s ( 3.4 seconds  in OpenLayers)

I thought that a layer definition based on a table would be much faster 
than on a view.
What should be the expected behavior please?

Please tell me is this should be asked to postgis forum.

thanks
Steve


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091204/358026db/attachment.html


More information about the mapserver-users mailing list