[mapserver-users] Is It Possible To Draw The Map Without Reading Joined Tables?

Richard Greenwood richard.greenwood at gmail.com
Thu Sep 24 19:17:41 PDT 2009


On Thu, Sep 24, 2009 at 5:51 PM, James Card <James.Card at calcad.com> wrote:
> We have a map that includes four layers that have OGR joins to database
> tables. The joined tables are used only for queries, not for theming or
> labeling the layers. When we compare performance of those same layers
> without the database joins we discover that maps are drawn in 1/3 - 1/5 of
> the time that's required for the joined layers.
>
> Is it possible to force MapServer to draw layers without reading the joined
> tables, but still have the tabular data available for queries?

Sure. Two approaches come to mind:
1. Define the layer twice, once without the join for spatial
rendering, and then again with a different name, including the joins,
for attribute queries.
2. Use 2 different map files. One for rendering, one for queries.

I'd recommend the second approach because it gives you some nice
flexibility, especailly with HEADER and FOOTER templates.

Regards,
-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the MapServer-users mailing list